Visual Studio 的立即 Window 中未捕获未处理的异常

Unhandled Exception not being caught in Immediate Window of Visual Studio

我有 AppDomain.CurrentDomain.UnhandledExceptionApplication.ThreadException 的事件侦听器。我正在立即 Window 中的 MODULE 中调用一个方法来设置侦听器,然后抛出异常。

  1. 为什么 VS Immediate Window 将该异常显示为 "First-Chance" 异常而不是 "Unhandled Exception"?
  2. 为什么我的事件侦听器没有捕捉到未处理的异常?

我的预感是即时 Window 在这里做了一些特别的事情,比如捕获所有未处理的异常,但这只是一个猜测。

来自汉斯·帕桑特:

调试器在您的 UnhandledException 事件处理程序可以 运行 之前介入。使用立即 window

时没有绕过它的选项