Breakpoint.Children Property
Gets a collection of objects contained within this code construct.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
ReadOnly Property Children As Breakpoints
Breakpoints Children { get; }
property Breakpoints^ Children {
Breakpoints^ get ();
}
abstract Children : Breakpoints with get
function get Children () : Breakpoints
Property Value
Type: EnvDTE.Breakpoints
A Breakpoints collection.
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:
Set a breakpoint in the target application.
Run the add-in. The number of breakpoint children is zero.
Run the target application in the debug mode.
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");
owp.Activate();
//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());
}
Shared Sub Children(ByRef dte As EnvDTE.DTE)
MessageBox.Show("Number of children: " + _
dte.Debugger.Breakpoints.Item(1).Children().Count().ToString())
End Sub
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Other Resources
How to: Compile and Run the Automation Object Model Code Examples