How do breakpoints work as debuggers

seeseekey.net

Sometimes software development can drive you crazy, especially when it comes to trivial things. So it should actually be a matter of course that the debugger stops at a breakpoint. My first thought was that it was because I set the project to "Any CPU" in debug mode. As soon as I set it to "x86" or "x64", the debugger stopped at the desired location. However, I had a similar project with almost the same settings (also "Any CPU"), but there it worked with the debugger. So it should be a comparison of the project files. After a while there was no success to report here either.

When starting the project, however, I noticed that the breakpoints were hidden:

The tooltip for the breakpoints then read:

No symbols have been loaded for this document

This made me look in the "bin / Debug" directory and lo and behold, there were no pdb files for the project. To create the pdb files for the project, go to the project settings, then to “Build” and then to “Advanced”.

In the dialog that opens, set the “Debug info” to “full”. With this the PDB files should be created and debugging should work again.

Further information is available at:
http://en.wikipedia.org/wiki/Program_database
http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.71%29.aspx
http://geekswithblogs.net/dbutscher/archive/2007/06/26/113472.aspx
http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/05/11/pdb-files-what-every-developer-must-know.aspx