Search code examples
asp.netvisual-studio-2008pdb-files

No symbols have been loaded and pdb file missing


I'm trying to understand why I get the "The breakpoint will not currently be hit. No symbols have been loaded for this document" message, when try to debug my web site application (note: no web application, in case it matters)

So far I found out that the pdb (project debug database) file is as important as the source code, and it should appear in the bin folder, but for whatever reason the file is missing, just some dll's are placed there, actually there is no pdb file in the entire directory.

My first question is: There should be a pdb file regardless whatever the kind of project that is being developing. Correct?

Second question: How can I re-create that file again, or what steps needs to be done in order to debug the project again?


Solution

  • Couple of things I do to try to correct this problem:

    • Clear the temporary ASP.NET files (C:\Windows\Microsoft .NET\Framework{version}\Temporary ASP.NET files{site} (You will need to quit Visual Studio and any web browsers pointing to the development site)
    • Start Task Manager and right click the W3WP.EXE process, select SET AFFINITY and uncheck all but one CPU

    Usually if I do this, then attach to the W3WP process to debug, the breakpoint will be filled in and I can step through my code.