Udostępnij za pośrednictwem


Debugger3.BreakpointLastHit Property

Definition

Gets the last breakpoint hit.

public:
 property EnvDTE::Breakpoint ^ BreakpointLastHit { EnvDTE::Breakpoint ^ get(); };
public:
 property EnvDTE::Breakpoint ^ BreakpointLastHit { EnvDTE::Breakpoint ^ get(); };
[System.Runtime.InteropServices.DispId(110)]
public EnvDTE.Breakpoint BreakpointLastHit { [System.Runtime.InteropServices.DispId(110)] get; }
[<System.Runtime.InteropServices.DispId(110)>]
[<get: System.Runtime.InteropServices.DispId(110)>]
member this.BreakpointLastHit : EnvDTE.Breakpoint
Public ReadOnly Property BreakpointLastHit As Breakpoint

Property Value

A Breakpoint object.

Implements

Attributes

Examples

The following example shows how to use the BreakpointLastHit property.

public static void BreakpointLastHit(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("Breakpoint Last   
    Hit Test");  
    owp.Activate();  

    EnvDTE90.Debugger3 debugger = (EnvDTE90.Debugger3)dte.Debugger;  
    owp.OutputString("Breakpoint last hit: " +  
                     debugger.BreakpointLastHit.Name);  
}  
Sub BreakpointLastHit()  
    ' This function dumps the name of the breakpoints last hit to  
    ' a new pane in the Output window.  
    Dim ow As OutputWindow  
    ow = DTE.Windows.Item(Constants.vsWindowKindOutput).Object  

    Dim bppane As OutputWindowPane  
    bppane = ow.OutputWindowPanes.Add("Debugger")  
    bppane.OutputString(DTE.Debugger.BreakpointLastHit.Name + vbCrLf)  
End Sub  

Remarks

BreakpointLastHit gets a bound Breakpoint that was the last breakpoint hit by the debugger. If the debugger hit multiple breakpoints simultaneously, this property returns one of the breakpoints; it does not define which breakpoint is returned. To see a collection of multiple breakpoints hit simultaneously, see AllBreakpointsLastHit.

Applies to