简体   繁体   English

调试时似乎反复抛出异常

[英]Exception seems to be thrown repeatedly when debugging

I am debugging an exception in my ASP.NET Application (C# , visual studio). 我在我的ASP.NET应用程序(C#,visual studio)中调试异常。 this exception is thrown at the top level of another thread (this is not the problem, i changed that behaviour to not throw a top level exception). 这个异常抛出在另一个线程的顶层(这不是问题,我改变了这种行为,不抛出顶级异常)。

I was just wondering about this: This Exception kills the whole worker process. 我只是想知道这个:这个例外杀死整个工人流程。 But, when i am debugging, the debugger stops at that exception and it seems to be 'thrown' repeatedly (whenever i press continue, it will stop at that same line again). 但是,当我调试时,调试器在该异常处停止并且它似乎被反复“抛出”(每当我按下继续时,它将再次停在同一行)。 It does not execute the line before again, so it really stops at that special exception. 它不会再次执行该行,因此它确实在该特殊异常处停止。

Is this just because of a special behaviour of the debugger? 这只是因为调试器的特殊行为? Or is that exception also thrown repeatedly when i am not debugging it? 或者,当我没有调试时,是否也会反复抛出该异常?

Thanks in advance! 提前致谢!

Is this just because of a special behaviour of the debugger? 这只是因为调试器的特殊行为? Or is that exception also thrown repeatedly when i am not debugging it? 或者,当我没有调试时,是否也会反复抛出该异常?

The Visual Studio debugger doesn't let the thread die due to the unhandled exception. 由于未处理的异常,Visual Studio调试器不会让线程死亡。 The exception isn't being rethrown, the debugger doesn't let the line continue since it will crash the process. 异常没有被重新抛出,调试器不会让行继续,因为它会使进程崩溃。 If the debugger wasn't attached, then IIS would give you the yellow screen of death and the event log would have been populated with the information contained within. 如果未附加调试器,则IIS将为您提供黄色的死亡屏幕,并且事件日志将填充其中包含的信息。

This is the same behavior for all applications, web or client side while debugging. 这与调试时所有应用程序,Web或客户端的行为相同。

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

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