This topic has not yet been rated - Rate this topic

Breakpoint2 Interface

Contains the properties and methods used to programmatically manipulate a breakpoint.

Namespace:  EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)
[GuidAttribute("FBC8D85A-E449-4CB3-B026-F7808DEB7792")]
public interface Breakpoint2 : Breakpoint

The following example demonstrates how to use the Children property on the Breakpoint2 object.

To test this property:

  1. Set a breakpoint in the target application.

  2. Run the add-in.

    The number of breakpoint children is zero.

  3. Run the target application in the debug mode.

  4. When the program stops on the breakpoint, run the add-in.

    The number of children is one.

public static void Children(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("Children Property 
Test");
    owp.Activate();

    //dte is a reference to the DTE2 object passed to you by the
    //OnConnection method that you implement when you create an Add-in.
    EnvDTE80.Debugger2 debugger = (EnvDTE80.Debugger2)dte.Debugger;
    owp.OutputString("Number of children: " + 
debugger.Breakpoints.Item(1).Children.Count.ToString());
}
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.