It looks like the answer is at the bottom of this MSDN documentation page .
The debugger searches for source files in the following places:
1. Files that are open in the IDE of the Visual Studio instance that launched the debugger. 2. Files in the solution that is open in the VS instance. 3. Directories that are specified in the "Common Properties" / "Debug Source Files" page in the properties of the solution. 4. The source information of the .pdb of the module. This can be the location of the source file when the module was built, or it can be a command to a source server.
To add a directory to the "Debug source solution files" page (step 3. above):
You can specify network or local directories to search for source files.
1. Select the solution in Solution Explorer and then choose "Properties" from the shortcut menu (ie right-click context menu). 2. Under the "Common Properties" node, choose "Debug Source Files". 3. Click the folder icon. Editable text appears in the "Directories containing source code" list. 4. Add the path that you want to search.
Please note that only the specified directory is searched. You must add entries for any subdirectories you want to find.
So, if you just want to debug a specific file once without cluttering up your solution, just open that file in Visual Studio; if you need to move from this file to others, you will most likely have to open other files in Visual Studio.
If you often have to debug source files outside of your solution, you can either:
- Add the source files to one of the existing projects in the solution or create a new project in the solution to place the source files. This clutters your solution / project, but since it will be checked in the source control, all team members will automatically be able to debug the source files.
- Add the directories containing the source code to the "Debug source files" solution. Since this change is not verified in source control, each team member who wants to debug source files will have to do this and add their local paths. In addition, if you receive the solution code on another computer, you will need to remember this step again.
deadlydog Jan 19 '14 at 16:08 2014-01-19 16:08
source share