Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2008 ASP.Net Debugging Zombie Breakpoints Come Back After Being Deleted

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?

like image 679
Tion Avatar asked Jun 30 '10 19:06

Tion


People also ask

How do I delete all Debug points in Visual Studio?

To clear all breakpoints in the applicationFrom the Debug menu, choose Clear All Breakpoints (CTRL+SHIFT+F9).

How do I keep breakpoints in Visual Studio?

To set a breakpoint in source code: Click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.

What happens when a breakpoint is reached when the debugger is enabled?

If a breakpoint is reached, or a signal not related to stepping occurs before count steps, stepping stops right away. Continue to the next source line in the current (innermost) stack frame. This is similar to step , but function calls that appear within the line of code are executed without stopping.

What happens when you execute the run skip all breakpoints command?

Visual Assist extends the debugging functionality of Visual Studio with a command to skip all breakpoints. When the command is executed, enabled breakpoints retain their enabled state but are automatically skipped, effectively disabling them.


2 Answers

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

like image 60
František Žiačik Avatar answered Sep 18 '22 21:09

František Žiačik


It's because its child breakpoints persist: MSDN article.

Your options are:
- Stop your debug session, then remove the breakpoint by clicking its red glyph.
- Find the breakpoint in the Breakpoint Window list and delete it from there.
- Use a macro to clean up child breakpoints between debug sessions, then remove by clicking the glyph.[1] (Quirky, but feels good when it works.)
- Use a macro to delete a breakpoint on the currently selected line.[2]

like image 45
Protector one Avatar answered Sep 17 '22 21:09

Protector one