Share via


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.Boolean
    Set 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

  1. Run the target application in the debug mode. Make sure that the application contains an infinite loop.

  2. 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

See Also

Reference

Process Interface

EnvDTE Namespace