禁用/删除子断点?
我正在 Visual Studio 中使用 C# 调试 ASP.NET 网站。当我设置断点(在调试期间)时,随着时间的推移,创建的断点将积累许多子断点。 (请参阅此处。)< br> 现在,有时当我通过单击红色字形删除断点时,下次执行该行时仍会命中该断点,因为子断点仍然存在。
删除断点窗口中的断点可以解决问题,但是当你设置了很多断点时,找到正确的断点很烦人。此外,删除具有许多子项的断点是一个相当慢的操作。
因此,要解决这个问题,我可以禁用子断点的创建,还是有办法快速删除所有子断点?
替代解决方案表示赞赏!
请注意,这不是此内容的重复:问题如何删除 Visual Studio 断点,因为我问如何处理子断点。 (尽管我们的预期目标是相同的。)
I'm debugging an ASP.NET Website with C# in Visual Studio. When I set a breakpoint (during debug), over time, the created breakpoint will accumulate many child breakpoints. (See here.)
Now, sometimes when I remove a breakpoint by clicking the red glyph, the breakpoint will still be hit the next time the line is executed, because the child breakpoints persisted.
Removing the breakpoint in the breakpoint window will resolve the problem, but it's annoying to find the correct breakpoint(s) when you have many set. Also, the removal of a breakpoint with many children is quite a slow operation.
So to get to the question, can I disable this creation of child breakpoints, or is there a way to quickly remove all children?
Alternative solutions are appreciated!
Please note that this isn't a duplicate of this: Question on how to remove a Visual Studio Breakpoint, because I'm asking how to deal with the child breakpoints. (Although our intended goal is the same.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
以下代码可以用作宏来删除所有子断点。
如果您有很多断点,它仍然非常慢,因此如果您遇到子断点问题,最好定期运行它。
The following code can be used as a macro to remove all the child breakpoints.
It's still insanely slow if you have many breakpoints, so it's best to do run it on a regular basis if you're having a problem with child breakpoints.
以下代码可用作宏来删除当前所选行上的断点。 (请注意,当断点被击中时,Visual Studio 会自动选择断点行。)
您可以为其分配键盘快捷键以方便访问。 (工具 > 选项 > 环境 > 键盘。)
The following code can be used as a macro to remove the breakpoint on the currently selected line. (Note that Visual Studio automatically selects the line of a breakpoint when it is hit.)
You can assign a keyboard shortcut to it for easy access. (Tools > Options > Environment > Keyboard.)
以下是基于 javascript 的新宏加载项的更新宏 (https://marketplace。 Visualstudio.com/items?itemName=VisualStudioPlatformTeam.MacrosforVisualStudio) 删除所有子断点:
Here's an updated macro for the new javascript based macro add-in (https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.MacrosforVisualStudio) to remove all children breakpoints: