Visual Studio能够记住以前调试会话中的断点,这非常棒。

但是,当我在调试时,通过单击它来清除其中一个“旧”断点时,它只是被暂时删除了。我的意思是,下次调试时,我以为我删除的断点又回来了。

这非常烦人——有没有设置让它不这样做?


当前回答

我一直在努力寻找“断点窗口”。这里有一个快速打开它的方法- ctrl+alt+B


或者你可以手动转到“调试->Windows->断点”来打开它。


或者你可以按ctrl+shift+F9一次删除所有断点!

其他回答

去调试>窗口>断点,找到断点,并从窗格中删除它们。

正如这里的回答

我认为这是一个设计缺陷,它非常令人沮丧,我们不得不长期忍受。我们经常碰到它,这已经成为常态。到目前为止给出的解决方案都是可行的。

一个更好的解决方案是聚在一起投票改变Visual Studio用户声音。这似乎已经被记录了几次,所以我们应该选择一个投票。

https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/31123351-delete-disable-break-point-while-debugging-should

进入调试菜单,然后按Ctrl+Shift+F9删除所有断点

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

用Visual Studio 2017快速回答这个老问题。

如果可能的话,只需剪切并粘贴带有断点的代码。断点随着切割而消失。