Aracılığıyla paylaş


Debugger3.Breakpoints Özellik

Kesme noktaları topluluğu alır.

Ad alanı:  EnvDTE90
Derleme:  EnvDTE90 (EnvDTE90.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Property Breakpoints As Breakpoints
    Get
Breakpoints Breakpoints { get; }
property Breakpoints^ Breakpoints {
    Breakpoints^ get ();
}
abstract Breakpoints : Breakpoints
function get Breakpoints () : Breakpoints

Özellik Değeri

Tür: EnvDTE.Breakpoints
A Breakpoints koleksiyonu.

Yüklenen

Debugger2.Breakpoints

Açıklamalar

Breakpointstüm kırılma noktalarını hata ayıklayıcıda ayarlamak koleksiyonu alır. Bu koleksiyon, tüm kesme noktalarını bekleyen bir listesini gösterir. Bkz: dbgBreakpointType Bekleyen bir açıklaması ve bağlı kesme noktaları.

Örnekler

Aşağıdaki örnek, nasıl kullanılacağını gösterir Breakpoints özelliği.

Bu özellik test etmek için:

  1. Hedef projeyi açın ve eklentiyi çalıştırın.
public static void Breakpoints(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("Breakpoints 
    Property");
    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.
    EnvDTE90.Debugger3 debugger = (EnvDTE90.Debugger3)dte.Debugger;

    // Set breakpoints.  
    debugger.Breakpoints.Add("","Target001.cs", 13, 1, "", 
        
EnvDTE.dbgBreakpointConditionType.dbgBreakpointConditionTypeWhenTrue, 
        "C#","", 0, "", 0, EnvDTE.dbgHitCountType.dbgHitCountTypeNone);
    debugger.Breakpoints.Add("","Target001.cs", 14, 1, "", 
        
EnvDTE.dbgBreakpointConditionType.dbgBreakpointConditionTypeWhenTrue, 
        "C#","", 0, "", 0, EnvDTE.dbgHitCountType.dbgHitCountTypeNone);            

    owp.OutputString("Number of breakpoints set: " + 
                     debugger.Breakpoints.Count + "\n");

    // List all breakpoints.
    foreach(EnvDTE90.Breakpoint3 bp in debugger.Breakpoints)
    {
        owp.OutputString(bp.Name + "\n");
    }
}
Sub ListAllBreakpoints()
    ' This function dumps the names of all the breakpoints 
    ' currently set 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 bps As Breakpoints
    bps = DTE.Debugger.Breakpoints

    If (bps.Count > 0) Then
        Dim bp As Breakpoint2
        For Each bp In bps
            bppane.OutputString(bp.Name + vbCrLf)
        Next
    Else
        bppane.OutputString("No breakpoints are set" + vbCrLf)
    End If
End Sub

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Debugger3 Arabirim

Breakpoints Fazla Yük

EnvDTE90 Ad Alanı