Share via


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
[GuidAttribute("FBC8D85A-E449-4CB3-B026-F7808DEB7792")]
public interface Breakpoint2 : Breakpoint
[GuidAttribute(L"FBC8D85A-E449-4CB3-B026-F7808DEB7792")]
public interface class Breakpoint2 : Breakpoint
[<GuidAttribute("FBC8D85A-E449-4CB3-B026-F7808DEB7792")>]
type Breakpoint2 =  
    interface 
        interface Breakpoint 
    end
public interface Breakpoint2 extends Breakpoint

The Breakpoint2 type exposes the following members.

Properties

  Name Description
Public property BreakWhenHit Gets or sets a value indicating whether the program breaks when a breakpoint is encountered.
Public property Children Gets a collection of all Breakpoint2 child objects.
Public property Collection Gets the collection containing all of the Breakpoint2 objects.
Public property Condition Gets the condition that triggers a breakpoint.
Public property ConditionType Gets the condition type of the breakpoint, which can be either break when true, or break when changed.
Public property CurrentHits Gets the number of times this breakpoint has been hit during this debugging session.
Public property DTE Gets the top-level extensibility object.
Public property Enabled Sets or returns the enabled state of the breakpoint.
Public property File Gets the name of the file in which the breakpoint is contained.
Public property FileColumn Gets the character location within a line in a file where the breakpoint is set.
Public property FileLine Gets the line within a file where the breakpoint is set.
Public property FilterBy Gets or sets a condition at which a breakpoint is set.
Public property FunctionColumnOffset Gets the column offset from the name of a function breakpoint.
Public property FunctionLineOffset Gets the line offset from the name of a function breakpoint.
Public property FunctionName Gets the name of the function containing the breakpoint.
Public property HitCountTarget Gets the hit count target for any type of breakpoint. It is interpreted based on the hit count type.
Public property HitCountType Gets the hit count type, which describes how to interpret a hit count.
Public property Language Gets the name of the programming language containing the breakpoint.
Public property LocationType Gets the location type the breakpoint represents.
Public property Macro Gets or sets a breakpoint macro.
Public property Message Gets or sets a breakpoint message.
Public property Name Sets or returns the name of the breakpoint.
Public property Parent Gets the immediate parent object of the breakpoint.
Public property Process Gets the Process2 associated with the current breakpoint.
Public property Program Gets the executable being managed by this process.
Public property Tag Sets or gets a user-defined string identifying this breakpoint.
Public property Type Gets a constant specifying the type of breakpoint.

Top

Methods

  Name Description
Public method Delete Deletes the breakpoint.
Public method ResetHitCount Resets the breakpoint hit count.

Top

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

EnvDTE80 Namespace

Other Resources

Automation Object Model Chart