I've just rejoined a C# project and my breakpoints stopped working in Visual Studio 2005.  Needless to say, this was hugely annoying.

It seems this is quite common though, Googling provided the following solutions :

  • Disable "Just my code" setting in debugging options.
  • Manually select "Managed code" when trying to attach to the IIS process at the start of debugging.
  • Change project properties to "debug" instead of "release"

None of these helped me, and I was about to attempt some more arduous solutions such as:

  • rebuilding the GAC
  • deleting all temp files associated with my project.

...however, my helpful colleague Miklos worked out a fix.  I had to :

  1. Rebuild All from my top level solution
  2. Then navigate to any page on the site, so that all DLLs are loaded
  3. Then (and only then) attach to process and debug as normal.

This works well for me on this particular project, thanks Mik!

Written by Celerity Design, on January 23, 2008
Tags:




Write a comment

  • Required fields are marked with *.

If you have trouble reading the code, click on the code itself to generate a new random code.
Security Code: