Search code examples
c++cvisual-studiovisual-studio-2008

"Debugging information cannot be found or does not match" Visual Studio's error message


I copied an existing project and renamed the folder. Now I get this error when I try to compile the application

Debugging information cannot be found or does not match. No symbols loaded. Do you want to continue debugging?

If I click Yes, it compiles and runs fine. But now I have to deal with that message. What can I change in the projects properties to get it to stop?


Solution

  • The main reason is that you don't have a matching PDB and EXE file.

    Some possible solutions:

    • You are compiling in release instead of debug
    • You need to clean/build or rebuild
    • You don't have your PDB files being generated in the same directory as the EXE file
    • You have a mismatching PDB file. Maybe the copied source is newer than today's date and something isn't building properly.
    • Try cleaning out all debug object files
    • You are attaching to a process that you started from a different location from where your build EXE and PDB files exist
    • Restart Visual Studio