Breakpoint2 Interface
Visual Studio 2008
Contains the properties and methods used to programmatically manipulate a breakpoint.
Assembly: EnvDTE80 (in EnvDTE80.dll)
The following example demonstrates how to use the Children property on the Breakpoint2 object.
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()); }