Condividi tramite


Debugger.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.

Attributes

Examples

The following example demonstrates how to use the BreakpointLastHit property.

public static void BreakpointLastHit(DTE dte)  
{  
    // Setup the 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();  

    owp.OutputString("Breakpoint last hit: " + dte.Debugger.BreakpointLastHit.Name);  
}  
Shared Sub BreakpointLastHit(ByRef dte As EnvDTE.DTE)  
    MessageBox.Show("Breakpoint last hit: " + dte.Debugger.BreakpointLastHit.Name, "Debugger Test")  
End Sub  

Remarks

BreakpointLastHit returns a bound Breakpoint object 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