Share via


Breakpoint2.Children Property

Gets a collection of all Breakpoint2 child objects.

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

Syntax

'Declaration
ReadOnly Property Children As Breakpoints
'Usage
Dim instance As Breakpoint2 
Dim value As Breakpoints 

value = instance.Children
Breakpoints Children { get; }
property Breakpoints^ Children {
    Breakpoints^ get ();
}
function get Children () : Breakpoints

Property Value

Type: EnvDTE.Breakpoints
A Breakpoints collection.

Implements

Breakpoint.Children

Remarks

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.

Examples

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(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());
}

.NET Framework Security

See Also

Reference

Breakpoint2 Interface

Breakpoint2 Members

Children Overload

EnvDTE80 Namespace

Other Resources

How to: Compile and Run the Automation Object Model Code Examples