Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Breakpoint2 Interface
Collapse the table of content
Expand the table of content

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
/** @attribute GuidAttribute("FBC8D85A-E449-4CB3-B026-F7808DEB7792") */ 
public interface Breakpoint2 extends Breakpoint
GuidAttribute("FBC8D85A-E449-4CB3-B026-F7808DEB7792") 
public interface Breakpoint2 extends 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());
}
Show:
© 2015 Microsoft