[英]How can I stop Visual Studio from breaking on Exceptions when I have already swallowed them?
I'm developing an application inside Visual Studio using C#. This is a simple Console application.我正在使用 C# 在 Visual Studio 中开发一个应用程序。这是一个简单的控制台应用程序。
In some places, I wish to swallow exceptions.在某些地方,我希望吞下异常。 Thus I use an empty catch
block.因此我使用了一个空的catch
块。 It' by design.这是设计使然。
When I hit F5, in codes of the try
block of that catch
block, when exceptions raise Visual Studio breaks on them.当我按 F5 键时,在该catch
块的try
块的代码中,当异常引发 Visual Studio 中断时。
This behavior is very annoying and reduces our debugging speed.这种行为非常烦人,会降低我们的调试速度。 I want those exceptions to not break at all.我希望这些异常根本不会中断。
How can I do that?我怎样才能做到这一点?
I searched the Options menu and I found nothing.我搜索了“选项”菜单,但一无所获。
Maybe start the programme without debugging and if your Try block is in a Loop then you should write a continue in the catch block也许不调试就启动程序,如果你的 Try 块在循环中,那么你应该在 catch 块中写一个 continue
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.