Debugger.BreakForUserUnhandledException(Exception) Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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

Proizvod Verzije
.NET 9, 10