Reputation: 4692
I'm trying to make a few additions to an open source project, npp-community, but can't seem to debug. The code that I'm trying to debug is compiled into a dll then linked to the primary project. When setting breakpoints I get the following error :
the breakpoint will not currently be hit. No symbols have been loaded for this document.
When I check the modules under debug>windows>modules
I check symbol load information and get the following error.
PDB does not match image
I have tried exiting visual studio and restarting/recompiling but that does not seem to fix anything. Google seems to give threads that go in circles and no clear answers.
Upvotes: 15
Views: 12210
Reputation: 939
I had a name clash with a nuget package. I was using the googletest package in a project that was called gtest. Visual Studio did not like that and couldn't find the pdb files. Renamed the project and then it worked.
Upvotes: 1
Reputation: 57
If you are debugging something that is a nuget package I recommend this:
Go in Tools->Options->Debugging->Symbols
and add https://symbols.nuget.org/download/symbols
Otherwise well, you are left with manually modifying guid from dll to match that in PDB file.
Upvotes: 0
Reputation: 664
I had this while working on a Smart Device project for WinCE5.0. The solution was to cold boot the device I was debugging on + clean the solution in vs2008
Upvotes: 0
Reputation: 1770
Sometimes it happens because you might have build the project as a release.
Right click on the solution and click on "Batch Build" > Check all your projects and click "Clean"
Upvotes: 1
Reputation: 101
i have a similar issue with my VS2010 project, turn out the issue is due to mistmatch of Project properties -> C/C++ -> Output Files -> 'Program Database File name', and Project properties -> Linker -> Debugging -> 'Generate Program Database File'.
Fixed it by change the 'Program Database File name' to "inherit from parent or project default".
Upvotes: 10
Reputation: 3864
The problem here lies in the fact that the debugger was unable to find a valid PDB files for your modules. PDB files are matched against binary images using two parameters: identifier (GUID) and age. There is more information about this process in this article.
Make sure that you have valid PDB files for your modules and that they are in the same directory as modules or in the debugger's search path (Debug->Options and settings...->Symbols).
Upvotes: 4