<p>I have an executable (compiled by someone else) that is hitting an assertion near my code. I work on the code in Visual C++ 2003, but I don't have a project file for this particular executable (the code is used to build many different tools). Is it possible to launch the binary in Visual C++'s debugger and just tell it where the sources are? I've done this before in GDB, so I know it ought to be possible.</p>

[{'answer_id': 31141, 'author': 'JamesSugrue', 'author_id': 1075, 'author_profile': 'https://Stackoverflow.com/users/1075', 'pm_score': 0, 'selected': False, 'text': "<p>Short of any other answers, I would try attaching to the executable process in Visual Studio, setting a break point in your code and when you step into the process you don't have source to, it should ask for a source file.</p>\n"}, {'answer_id': 31148, 'author': 'Anders Sandvig', 'author_id': 1709, 'author_profile': 'https://Stackoverflow.com/users/1709', 'pm_score': 0, 'selected': False, 'text': "<p>Yes, it's possible. Just set up an empty project and specify the desired <code>.exe</code> file as debug target. I don't remember exactly how, but I know it's doable, because I used to set <code>winamp.exe</code> as debug target when I developed plug-ins for Winamp.</p>\n\n<p>Since you don't have the source file it will only show the assembly code, but that might still be useful as you can also inspect memory, registers, etc.</p>\n\n<p><strong>Update</strong></p>\n\n<p>If you are debugging an assertion in your own program you should be able to see the source just fine, since the path to the source file is stored in the executable when you compile it with debug information.</p>\n"}, {'answer_id': 46135, 'author': 'Aardvark', 'author_id': 3655, 'author_profile': 'https://Stackoverflow.com/users/3655', 'pm_score': 2, 'selected': False, 'text': "<p>Without the PDB symbols for that application you're going to have a tough time making heads or tails of what is going on and where. I think any source code information is going to be only in that PDB file that was created when whoever built that application.</p>\n\n<p>This is assuming that the PDB file was EVER created for this application - which is not the default configuration for release mode VC++ projects I think. Since you're asserting, I guessing this is a debug configuration?</p>\n"}]
['https://Stackoverflow.com/questions/31075', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1891/']