Visual Studio refuses to forget breakpoints?

32,394

Solution 1

go to Debug menu then Delete All Breakpoints Ctrl+Shift+F9

Solution 2

The problem is that child breakpoints of your breakpoints persist. Child breakpoints are created (in certain situations) when setting breakpoints during a debug session.

A surefire way of deleting a breakpoint (and children) is to manually look for it in the breakpoint window, and delete it from there. (Select the top node of the entry, hit Delete.)

If you're running an (old) version of Visual Studio that supports VBScript macros, you could run the macro posted here (between debug sessions), to remove child breakpoints. This will make removing breakpoints by clicking the glyph somewhat more effective and predictable, but it continues to be problematic and awkward.

Solution 3

I was struggling to find the 'BreakPoints Window'.So here's the quick way to open it- ctrl+alt+B

enter image description here


Or you can manually go to 'Debug->Windows->Breakpoints' to open it.

enter image description here


Or you can hit ctrl+shift+F9 to delete all breakpoints at once!

Solution 4

There are some answers here, but in my opinion proposed actions are distractive to use during debugging (I don't want to lose my focus).

My flow with sticky breakpoints during breakpoints is as follows:

During debug, DISABLE the breakpoint instead of removing it.

Possible ways of disabling a breakpoint:

  • hover with cursor and click the two cycle icon;
  • or use context menu on it;
  • or keyboard short-cut CTRL+F9 (not Shift+CTRL+F9, as it clears all breakpoints).

Later on, during development, I remove a disabled breakpoint when I see one.

PS. It's also a good practice to remove all breakpoints once in a while.

Solution 5

  • Start your debug session with a minimal number of files open, as you debug the unwanted breakpoints will show up and the containing files will open in new tabs.
  • Terminate the debug session and open the breakpoints window (from the debug toolbar, for some reason it is not in the view menu).
  • For each file, enter the name of the file in the search area of the breakpoints window and press enter to filter out the breakpoints by file.
  • You can then click on each breakpoint in the window to see where they are located in the code and delete them if you want. A bit tedious but that the best way I found to get rid of those unwanted ghost breakpoints... Bookmarks and breakpoints management.. Those functions were probably last enhanced sometime during the last century...
Share:
32,394

Related videos on Youtube

dan
Author by

dan

i sometimes worry about the coming robot uprising.

Updated on July 01, 2021

Comments

  • dan
    dan almost 3 years

    Visual Studio remembers breakpoints from previous debugging sessions, which is awesome.

    However, when I'm debugging, and I clear one of these "old" breakpoints by clicking on it, it's only temporarily deleted. What I mean is the next time I debug, the breakpoint that I thought I removed is back.

    This is super annoying--is there a setting to make it not do this?

    • dlev
      dlev about 13 years
      If you remove them once the debugger has stopped, they'll stay gone for good.
    • Александр Рязанов
      Александр Рязанов almost 10 years
      bug report closed "as by design" back in 2009; explanation from MS - connect.microsoft.com/VisualStudio/feedback/details/476744/…
    • jsuddsjr
      jsuddsjr over 9 years
      If you have the new beta of VS 2015, you can Send a Frown. Maybe they will listen if we all do it.
    • aruno
      aruno almost 9 years
      that connect URL no longer works - but I recall it was something about threads - but how hard is it to add a 'permanently remove breakpoint' right click option regardless of what the reason was???
    • Diederik
      Diederik over 8 years
      Looks like this is the original link thread. social.msdn.microsoft.com/Forums/vstudio/en-US/…
    • Michael Brown
      Michael Brown over 7 years
      I agree, this is dumb behavior and is more annoying than anything as it's not expected UX behavior.
    • kkuilla
      kkuilla over 7 years
      I deleted the breakpoint, then File -> Save, File-> Exit, re-open the project and VS did not stop at that breakpoint again.
    • ProgrammingLlama
      ProgrammingLlama about 7 years
      Why do they not just provide a "Delete pending breakpoint" option in the breakpoint context menu? It's not rocket science.
  • jams
    jams about 13 years
    Try this select the Breakpoints toolbar item from the Debug toolbar. This brings up the Breakpoints window. From this window, you can view all breakpoints in the application. Here, you select and clear the breakpoint by clicking the Delete button from the toolbar on the Breakpoints pane.
  • fun_vit
    fun_vit almost 9 years
    wonderful - hot key works in express edition (which has no item in menu).
  • andrew.fox
    andrew.fox over 8 years
    no good when I want to remove only ONE breakpoint not all of them
  • Dinerdo
    Dinerdo over 7 years
    This doesn't fix the issue all the time. I've used it, and the breakpoint still comes back.. It's in an annoying place where I can't get past it until I'm done pressing continue 50+ times.
  • ItsAllABadJoke
    ItsAllABadJoke about 7 years
    If disable works, I don't see why "bound breakpoints" vs. "pending breakpoints" as described in the article above (re: closed by design) is an insurmountable problem.
  • Tom Blodget
    Tom Blodget almost 7 years
    @Dinerdo Instead of deleting it, you can try disabling it or adding a condition that is never true.
  • Morné
    Morné about 3 years
    Disabling them did not work for me, I had to right click and delete them completely.
  • JHM
    JHM over 2 years
    Would you believe this is still an issue after 11 years and a good number of version increments...