Process.Break Method
Causes the given process to pause its execution so that its current state can be analyzed.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
Sub Break ( _
WaitForBreakMode As Boolean _
)
void Break(
bool WaitForBreakMode
)
void Break(
[InAttribute] bool WaitForBreakMode
)
abstract Break :
WaitForBreakMode:bool -> unit
function Break(
WaitForBreakMode : boolean
)
Parameters
WaitForBreakMode
Type: System.BooleanSet to true to return only when the debugger has entered break mode. Set to false to break and return immediately. For more information, see Breaking Execution.
Examples
The following example demonstrates how to use the Break method.
To test this method
Run the target application in the debug mode. Make sure that the application contains an infinite loop.
Run the add-in.
public static void Break(DTE dte)
{
EnvDTE.Processes processes = dte.Debugger.DebuggedProcesses;
processes.Item(1).Break(true);
}
Shared Sub Break(ByRef dte As EnvDTE.DTE)
Dim processes As EnvDTE.Processes = dte.Debugger.DebuggedProcesses
processes.Item(1).Break(True)
End Sub
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.