Signals a breakpoint to an attached debugger.
Assembly: mscorlib (in mscorlib.dll)
Public Shared Sub Break
public static void Break()
public: static void Break()
static member Break : unit -> unit
| Exception | Condition |
|---|---|
| SecurityException |
The System.Security.Permissions.UIPermission is not set to break into the debugger. |
If no debugger is attached, users are asked if they want to attach a debugger. If yes, the debugger is started. If a debugger is attached, the debugger is signaled with a user breakpoint event, and the debugger suspends execution of the process just as if a debugger breakpoint had been hit.
.NET Framework
Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0.NET Framework Client Profile
Supported in: 4, 3.5 SP1Portable Class Library
Supported in: Portable Class Library-
UIPermission
for permission to start a debugger. Associated enumeration: PermissionState.Unrestricted
-
SecurityPermission
for operating with unmanaged code. Associated enumeration: SecurityPermissionFlag.UnmanagedCode Security action: Demand.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.