views:

618

answers:

5

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. Just curious about what i change in the projects properties to get it to stop.

+1  A: 

The pdb or Program Database file appears to be missing (basically, the path has changed and can no longer be found by the compiler). See this related post for additional information.

dirkgently
+1  A: 

The main reason is that you don't have a matching pdb and exe.

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
  • You have a mismatching pdb, 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 exist
Brian R. Bondy
A: 

Hi,

You probably have deactivated the debugging infos for your project:

  • Right clic on you project -> Propreties
  • Configuration properties -> Linker -> Debugging
  • Switch "Generate Debug Info" from No to Yes

Rebuild your project and retry, it should now run without the message :)

Niklaos
A: 

I had a similar problem and the reason was that I had run one of the projects of my solution in a different process and that process couldn't be killed. I didn't think much of it. So when I was building the solution in a separate environment one of the pdb files didn't match so at the end I couldn't load any of the pdb files. I just restarted my computer and that fixed it.

Good luck

oliver
A: 

This happens to me every now and then, while debugging code and making changes it seems like visual studio caches the pdb information and sometimes it gets stuck. Doing a Rebuild solution, deleting the pdb and creating a new one doesn't fix the problem.

Of course I do have the generate debug information on and all that it's needed, specially since this happens while debugging the code several times.

Visual Studio seems to be happy with the in-memory pdb and refuses to update it, regardless of time-stamps or even size changes in the pdb.

The only way to reset this is to exit Visual Studio (the IDE) and restart it again.

In some rare occurrences, the IDE might be still running in the background (process explorer shows it there) and might hold the handle to the file open. You can kill the process before restarting the IDE.

Good Luck

Miguel