共用方式為


Breakpoint.Children Property

Definition

Gets a collection of objects contained within this code construct.

public:
 property EnvDTE::Breakpoints ^ Children { EnvDTE::Breakpoints ^ get(); };
[System.Runtime.InteropServices.DispId(203)]
public EnvDTE.Breakpoints Children { [System.Runtime.InteropServices.DispId(203)] get; }
[<System.Runtime.InteropServices.DispId(203)>]
[<get: System.Runtime.InteropServices.DispId(203)>]
member this.Children : EnvDTE.Breakpoints
Public ReadOnly Property Children As Breakpoints

Property Value

A Breakpoints collection.

Attributes

Examples

The following example demonstrates how to use the Children property.

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");  
    owp.Activate();  
    EnvDTE.Debugger debugger = (EnvDTE.Debugger)dte.Debugger;  
    owp.OutputString("Number of children: " + debugger.Breakpoints.Item(1).Children.Count.ToString());  
}  
Shared Sub Children(ByRef dte As EnvDTE.DTE)  
    MessageBox.Show("Number of children: " + _  
                    dte.Debugger.Breakpoints.Item(1).Children().Count().ToString())  
End Sub  

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.

Applies to