views:

140

answers:

4

In Visual Studio 2008 while debugging an ASP.Net website I set a breakpoint in the codebehind page. I refresh the page or submit to call the method, the breakpoint is hit. Then I delete the breakpoint and continue execution. I make a change to the codebehind page and save it. I submit or refresh again and the deleted breakpoint is back! It is hit again, and I delete it again. I have tried delete, disable, nothing works it keeps coming back if I make a change to the page. It is extremely annoying and unproductive. The only way I have found to make the breakpoint permanently go away is to use the Debug menu Delete all breakpoints item, which is obviously less than ideal. I have been able to reproduce this on other developers machines also. What is going on here? Is this by design? Is it a bug in VS? How do I keep these zombie breakpoints from resurrecting?

+1  A: 

I've had this problem too. If you stop debugging (click stop) before you delete the breakpoint, it should go away permanently.

Mike Comstock
+2  A: 

It's probably a bug. Either use Delete All Breakpoints (Shift+F9) or try deleting the breakpoint in stopped (not Run) mode.

František Žiačik
It's not a bug, it's likely a multi-bound breakpoint. See http://connect.microsoft.com/VisualStudio/feedback/details/391642/permanently-remove-a-breakpoint-in-visual-studio-during-debugging
womp
@womp: nice, didn't know that, thank you
František Žiačik
+2  A: 

This could explain the behavior you are seeing: http://connect.microsoft.com/VisualStudio/feedback/details/476744/the-mystery-of-the-reappearing-breakpoints

sgriffinusa
+1  A: 

I think this is by design.

Remove a breakpoint in debug mode and it's temporary. Remove a breakpoint in design mode and its permanent.

Jeroen