Have you ever been debugging and found yourself looking at the wrong source code? Typically, this happens to me when I just hit the escape key at the dialog prompting me for the source file. I was recently asked how to reset the source code association by one of the folks here. After a few minutes of trial and error (restarting debugging, etc), I remembered that source file associations are stored as part of the solution's user options.
To update the source code search paths in the Visual Studio debugger, do the following:
- In the Solution Explorer, right click on the solution name (ex: Solution 'TestApplication') and select Properties
This will bring up the Solution Property Pages dialog
- Under Common Properties, select Debug Source Files
- In the Search these paths for source code files (Visual Studio .NET 2003) / Directories containing source code (Visual Studio 2005) box, add, remove and/or reorder the directories as desired
- Click the OK button
Once you have done the above steps, I recommend closing the incorrectly associated source files (to avoid any confusion later on), then reload the desired file(s). While stopped in the debugger, you can do this by double clicking on the desired frame in the Call Stack window (or right clicking the frame and selecting Go To Source Code).
This posting is provided "AS IS" with no warranties, and confers no rights.
Some of the information contained within this post may be in relation to beta software. Any and all details are subject to change.