简体   繁体   English

您可以在 Visual Studio 2017/2019 的调试模式下跳过剩余的断点吗?

[英]Can you skip remaining breakpoints in debug mode in Visual Studio 2017/2019?

When I'm debugging an application and I have numerous breakpoints all over the place, if I have finished debugging the part I'm interested in, is it possible to then ignore all the remaining breakpoints and run the application?当我在调试应用程序并且到处都有大量断点时,如果我已经完成了我感兴趣的部分的调试,是否可以忽略所有剩余的断点并运行应用程序?

I don't want to delete them or disable them permanently - kind of just a quick keyboard shortcut to say yeh I'm happy with the current bit of debugging and I want to check the output before moving on to the next.我不想删除它们或永久禁用它们——这只是一个快速的键盘快捷键,我对当前的调试很满意,我想在继续下一个之前检查 output。

Thanks for any help谢谢你的帮助

Although I use "VS code", it is similar in VS虽然我使用“VS代码”,但在VS中是类似的

Debug > Disable all breakpoint.调试 > 禁用所有断点。

When you want to enable Debug > Enable All breakpoint.当您要启用 Debug > Enable All 断点时。 在此处输入图像描述

You can disable the breakpoints to ignore all the remaining breakpoints.您可以禁用断点以忽略所有剩余的断点。 在此处输入图像描述

In Visual Studio 2019: If you just want to disable them go to Debug and disable them there.在 Visual Studio 2019 中:如果您只想禁用它们 go 来调试并在那里禁用它们。 If you want to set up a keyboard shortcut go to Tools/Options/Environment/Keyboard then in the input box titled Show commands containing: type disable You should see Debug.DisableAllBreakpoints there, you can set a new shortcut for this and use it.如果你想设置一个键盘快捷键 go 到 Tools/Options/Environment/Keyboard 然后在标题为 Show commands contains: type disable 你应该在那里看到 Debug.DisableAllBreakpoints 的输入框中,你可以为此设置一个新的快捷方式并使用它。

While debugging, you can choose Disable breakpoints from Debug tab in visual studio to skip rest of the breakpoints.在调试时,您可以从 Visual Studio 的 Debug 选项卡中选择 Disable breakpoints 以跳过断点的 rest。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM