Visual Studio VS 2010 not stopping at breakpoints

Ever wondered why suddenly you cannot debug because the compiler isnt breaking on your breakpoints.

There are several reasons for this.

make sure that.
1. Your project is compiling when you begin debugging (check this in build > configuration manager)
2. Ensure your projects are compiling in debug mode not release (check this in build >configuration manager)
3. In the Webconfig ensure you are in debug mode

4. The (project properties > startup options > debuggers has the ASP.NET checkbox checked)
5. Delete all pdb files in your bin folder
6. Ensure every project referenced is set to build under (build > configuration manager)
7. Do a full clean and rebuild. (build > clean solution) (build > rebuild solution)

Finally and this is the one that caught me out
8. Check you are not setting a cookie cache timeout of positive time, I was expiring my page after 1 day. The best way to check this is to load a page in debug, knowing your break point will not be stopped at. Once the page is fully loaded hit ctrl F5 to force full reload of the page. If your breakpoint is stopped at then you know its a cache problem.

4 thoughts on “Visual Studio VS 2010 not stopping at breakpoints”

  1. OK, this doesn’t seem to address my problem. I’m writing a Windows Forms app, not a Web app, so there is no Web.config. I’ve been debugging a form validation issue, and quite suddenly Visual Studio just stopped hitting all breakpoints. Thinking my system might be overtaxed, I closed down VS and rebooted. After booting back up and launching VS again, I find that the issue remains. I have changed nothing in Visual Studio or project settings. It just stopped hitting breakpoints.

    This is Visual Studio 2010, version 10.0.40219.1 SP1Rel. The application is on .NET version 4.0 Client Profile, and is sitting atop two class library projects, both on .NET 4.0. The application is an MDI app, and I am working in a form that is being raised as a dialog.

    Any ideas? Thanks in advance.

  2. Heh. Found the problem. Evidently VS was overtaxed, and in one of those weird behavioral quirks (I’ve seen all kinds of odd behavior when it’s been running too long), that particular form lost all of its event handlers. I recreated the handlers and got my breakpoints back.

Leave a Reply to Monir Cancel reply

Your email address will not be published. Required fields are marked *