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.
From Visual Studio, select Tools > Options > Debugging. Select Symbols from the list, and then select the + sign to add a new Azure DevOps symbol server location.
In a developer command prompt, you can use the mspdbcmf.exe tool to generate a full PDB from this limited PDB. In Visual Studio, use the Project or Build menu items for generating a full PDB file to create a full PDB for the project or solution.
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.
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\"
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
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! :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With