Bagikan melalui


Breakpoint2 Interface

Contains the properties and methods used to programmatically manipulate a breakpoint.

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

Syntax

'Declaration
<GuidAttribute("FBC8D85A-E449-4CB3-B026-F7808DEB7792")> _
Public Interface Breakpoint2 _
    Inherits Breakpoint
'Usage
Dim instance As Breakpoint2
[GuidAttribute("FBC8D85A-E449-4CB3-B026-F7808DEB7792")]
public interface Breakpoint2 : Breakpoint
[GuidAttribute(L"FBC8D85A-E449-4CB3-B026-F7808DEB7792")]
public interface class Breakpoint2 : Breakpoint
public interface Breakpoint2 extends Breakpoint

Examples

The following example demonstrates how to use the Children property on the Breakpoint2 object.

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

See Also

Reference

Breakpoint2 Members

EnvDTE80 Namespace

Other Resources

Automation Object Model Chart