Continuing in the Visual Studio debugger after an exception occurs

前端 未结 5 1218
星月不相逢
星月不相逢 2020-12-03 06:32

When I debug a C# program and I get an exception throwed (either thrown by code OR thrown by the framework), the IDE stops and get me to the corresponding line in my code.

5条回答
  •  死守一世寂寞
    2020-12-03 07:08

    You probably have the option "Unwind the callstack on unhandled exceptions" checked in Visual Studio. When this option is on Visual Studio will unwind to right before the exception, so hitting F5 will keep ramming into the same exception.

    If you uncheck the option Visual Studio will break at the exception, but hitting F5 will proceed past that line.

    This option is under menu ToolsOptionsDebuggingGeneral.

提交回复
热议问题