Children Property
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Breakpoint.Children Property

Gets a collection of objects contained within this code construct.

Namespace: EnvDTE
Assembly: EnvDTE (in envdte.dll)

Breakpoints Children { get; }
/** @property */
Breakpoints get_Children ()

function get Children () : Breakpoints

Property Value

A Breakpoints collection.

If the Breakpoint has no children, then Nothing is returned.

The children are created when a pending breakpoint that is set in the design mode is bound to the specific instance of your application in break or run mode.

The following example demonstrates how to use the Children property.

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(DTE 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");

    //dte is a reference to the DTE object passed to you by the
    //OnConnection method that you implement when you create an add-in.
    EnvDTE.Debugger debugger = (EnvDTE.Debugger)dte.Debugger;
    owp.OutputString("Number of children: " + debugger.Breakpoints.Item(1).Children.Count.ToString());
© 2015 Microsoft