How to load symbols in Visual Studio 2012
When I am debugging my app I see messages:
cannot find or open the PDB file
I seem to remember being able to specify the location of the PDB file while debugging the app. How can I do this? I'm using Visual Studio 2012.
Adding Symbols Location
Open Settings: Tools->Options -> Debugging -> Symbols and add directory, where your .PDB files are located.
screenshot of Visual Studio Interface where this menu located
You can add custom path, like for each project, and also you can edit common path, where Visual Studio will save all .pdb cache.
Making post-build script
I made in each project post-compile event, which copy all .pdb to one folder, by this i have all in one place. But you can store it separately, which i found not so convenient, as it require each time edit list of locations.
Example of post-debug script to copy .pdb and .dll to Symbols cache location:
xcopy /Y /R "$(TargetDir)$(ProjectName).pdb" "D:VS_CACHE"
xcopy /Y /R "$(TargetDir)$(ProjectName).dll" "D:VS_CACHE"
Solving problem if symbols not found
When you in debug mode, and for some reason symbols not found, it can be because of multiple reasons:
screenshot of Visual Studio interface Modules -> Load Symbols
Making Debugging more easy:
To re-attach VS Debugger to running application, i recommend to use this free Visual Studio add-on (support VS 2015):
ReAttach : visualstudiogallery.msdn.microsoft.com/8cccc206-b9de-42ef-8f5a-160ad0f017ae
It will save you a lot of time! :)
链接地址: http://www.djcxy.com/p/74564.html