다음을 통해 공유


Debugger.AllBreakpointsLastHit Property

Definition

Gets a collection of bound breakpoints that were last simultaneously hit.

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

Property Value

A Breakpoints collection.

Attributes

Examples

The following example demonstrates how to use AllBreakpointsLastHit property.

Sub ListBreakpointsLastHit()  
    ' This function dumps the names of all 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")  

    Dim hitbps As Breakpoints  
    hitbps = DTE.Debugger.AllBreakpointsLastHit  

    If (hitbps.Count > 0) Then  
        Dim bp As Breakpoint  
        For Each bp In hitbps  
            bppane.OutputString(bp.Name + vbCrLf)  
        Next  
    Else  
        bppane.OutputString("No breakpoints were hit")  
    End If  
End Sub  

Remarks

AllBreakpointsLastHit returns a Breakpoints collection containing multiple, bound breakpoints that the debugger hit simultaneously. See dbgBreakpointType enumeration for more information on bound breakpoints. To retrieve only one breakpoint, use the BreakpointLastHit property.

Applies to