By dan

2011-05-12 20:14:37 8 Comments

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?


@Ya. 2020-02-24 23:24:22

If you are debugging a web application and set a breakpoint in chrome, VS code will honor that breakpoint and will not let you remove it. In other words the effective breakpoints is the sum of the breakpoints set in VS Code and in your chrome. And yes, sometimes it's easy to forget that you set a breakpoint in chrome and get lost in trying to figure out how to remove it from VS Code.

@Ryan B 2018-02-16 01:49:00

I consider this a design flaw, its very frustrating and something we have had to live with for a long time. We hit it so often that it just becomes the norm. The solutions given so far are really work around.

A better solution would be to get together and vote for a change on the Visual Studio User Voice. It seems like this has been logged a few times so we should pick one to vote up.

@Protector one 2012-04-17 08:29:42

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.

@Hamed Mahdizadeh 2017-09-07 08:29:11

Go to debug > windows > breakpoints and find breakpoints and remove those from pane.

as It was answered here

@J.H. 2017-05-31 18:00:55

A quick alternative answer to this old question that just hit me with Visual Studio 2017.

If possible, just cut and paste the code with the breakpoint on it. The breakpoint goes away with the cut.

@JerryGoyal 2016-05-18 06:02:45

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! 2016-03-11 08:24:50

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.

@ItsAllABadJoke 2017-05-19 15:28:15

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.

@Robert 2015-08-27 11:13:39

Most breakpoints can be removed during debug-session, but some are stuck (probably a bug in Visual Studio).

It you want to remove only the breakpoint which is stuck, then use the "Breakpoints" windows found on the debug menu. There you will probably see that your breakpoint exist multiple times for the same row. Simply rightclick and delete it.

@pasx 2012-05-18 14:17:55

  • 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...

@jams 2011-05-12 20:18:19

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

@jams 2011-05-12 20:50:27

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 2015-07-07 09:52:33

wonderful - hot key works in express edition (which has no item in menu). 2016-03-11 09:07:22

no good when I want to remove only ONE breakpoint not all of them

@Dinerdo 2017-03-10 20:00:22

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.

@Tom Blodget 2017-08-29 20:02:25

@Dinerdo Instead of deleting it, you can try disabling it or adding a condition that is never true.

Related Questions

Sponsored Content

52 Answered Questions

[SOLVED] Visual Studio debugging/loading very slow

20 Answered Questions

[SOLVED] .gitignore for Visual Studio Projects and Solutions

24 Answered Questions

11 Answered Questions

14 Answered Questions

12 Answered Questions

[SOLVED] Can you force Visual Studio to always run as an Administrator in Windows 8?

12 Answered Questions

[SOLVED] Writing to output window of Visual Studio

49 Answered Questions

Sponsored Content