Debugger.BreakForUserUnhandledException(Exception) Method

Definition

Signals a breakpoint to an attached debugger with the exception details if a .NET debugger is attached with break on user-unhandled exception enabled and a method attributed with DebuggerDisableUserUnhandledExceptionsAttribute calls this method.

C#
public static void BreakForUserUnhandledException(Exception exception);

Parameters

exception
Exception

The user-unhandled exception.

Remarks

This API is designed to be used with DebuggerDisableUserUnhandledExceptionsAttribute. If a .NET debugger is attached and the debugger supports breaking on user-unhandled exceptions, this method signals a breakpoint to the debugger with the exception parameter.

Applies to

Product Versions
.NET 9