Aracılığıyla paylaş


Breakpoint2.ConditionType Özellik

Doğru olduğunda ya da sonu olabilir, kesme noktası veya değiştiğinde sonu koşul türü alır.

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

Sözdizimi

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

Özellik Değeri

Tür: EnvDTE.dbgBreakpointConditionType
Birini dbgBreakpointConditionType değerler.

Yüklenen

Breakpoint.ConditionType

Açıklamalar

Bu tür gösterebilir sonu veya ne zaman bir koşul doğruysa değişti.

Örnekler

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

Bu özellik test etmek için:

  1. Eklentiyi çalıştırın.

  2. Hedef uygulamayı çalıştırın.

public static void ConditionType(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 Condition and Type are: ");
    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;
    //Stop at the breakpoint, if TempC < TempF is true
    debugger.Breakpoints.Add("", "Target001.cs", 15, 1, "tempC < tempF",
                             EnvDTE.dbgBreakpointConditionType.dbgBreakpointConditionTypeWhenTrue,
                             "C#", "", 0, "", 0, EnvDTE.dbgHitCountType.dbgHitCountTypeNone);
    string strCondition = debugger.Breakpoints.Item(1).Condition;
    string strConditionType = debugger.Breakpoints.Item(1).ConditionType.ToString();
    owp.OutputString(strCondition + "\n" + strConditionType);
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Breakpoint2 Arabirim

ConditionType Fazla Yük

EnvDTE80 Ad Alanı

Diğer Kaynaklar

Nasıl Yapılır: derlemek ve otomasyon nesne modeli kod örnekleri çalıştırma

Nasıl Yapılır: kesme noktası noktası koşulu belirleme