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
Breakpoints Children { get; }
property Breakpoints^ Children {
Breakpoints^ get ();
}
abstract Children : Breakpoints
function get Children () : Breakpoints
Property Value
Type: EnvDTE.Breakpoints
A Breakpoints collection.
Implements
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(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
- 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