例外似乎是抛出反复调试时, [英] Exception seems to be thrown repeatedly when debugging

查看:125
本文介绍了例外似乎是抛出反复调试时,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的ASP.NET应用程序(C#,Visual Studio中)调试异常。
这个例外是在另一个线程的顶级抛出(这不是问题,我改变了这种行为不是抛出一个顶层除外)。

我只是想知道这一点:
此异常杀死整个工作进程。但是,当我调试,调试器停止在该例外,它似乎是'抛出'反复(每当我preSS继续下去,它将在同一条线上再次停止)。它不会再次执行前行,所以它真的会停在特殊的例外情况。

这只是因为调试器的特殊行为?或者是说异常也一再抛出当我没有调试呢?

在此先感谢!


解决方案

  

这只是因为调试器的特殊行为?或者是
  该异常也一再抛出当我没有调试呢?


Visual Studio调试器不线程芯片让因未处理的异常。唯一的例外是没有被再次抛出,调试器不会让行继续,因为它会崩溃的过程。如果调试器没有连接,那么IIS会给你死亡的黄色画面和事件日志将被填充了其中所包含的信息。

这是所有应用程序,网页或客户端调试时相同的行为。

I am debugging an exception in my ASP.NET Application (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. 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.

This is the same behavior for all applications, web or client side while debugging.

这篇关于例外似乎是抛出反复调试时,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆