Debugger3::Break Method (Boolean)

 

Causes the given process to pause its execution so that its current state can be analyzed.

Namespace:   EnvDTE90
Assembly:  EnvDTE90 (in EnvDTE90.dll)

void Break(
	bool WaitForBreakMode = true
)

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 How to: Break Execution.

Causes the given process to pause its execution so that its current state can be analyzed.

The following example shows how to use the Break method.

public static void Break(EnvDTE80.DTE2 dte)
{
    // Setup debug Output window.
    Window w = 
    (Window)dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);
    w.Visible = true;
    OutputWindow ow = (OutputWindow)w.Object;
    OutputWindowPane owp = ow.OutputWindowPanes.Add("Break Method 
    Test");
    owp.Activate();

    EnvDTE90.Debugger3 debugger = (EnvDTE90.Debugger3)dte.Debugger;
    debugger.Break(false);
    owp.OutputString("The process is paused. Examine the values of 
    variables.");
}
Return to top
Show: