Proprietà Breakpoint2.FilterBy

Ottiene o imposta una condizione in cui viene impostato un punto di interruzione.

Spazio dei nomi:  EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

Sintassi

'Dichiarazione
Property FilterBy As String
string FilterBy { get; set; }
property String^ FilterBy {
    String^ get ();
    void set (String^ value);
}
abstract FilterBy : string with get, set
function get FilterBy () : String
function set FilterBy (value : String)

Valore proprietà

Tipo: System.String
Stringa contenente una condizione in cui viene impostato un punto di interruzione.

Note

È possibile specificare una o più condizioni in cui viene impostato un punto di interruzione.utilizzo & (E), ||(OR)! (NON) e parentesi per combinare le clausole seguenti:

== “Computer di„ MachineName

== 123 Di idprocesso da

ProcessName = “processo„

ThreadID = 123

ThreadName = “thread„

Se nessuna condizione specificata, è impostato il punto di interruzione in tutti i processi e thread su qualsiasi computer.

Esempi

Nell'esempio seguente viene illustrato come utilizzare FilterBy proprietà.

Per verificare questa proprietà:

Aprire il progetto di destinazione ed eseguire il componente aggiuntivo.

public static void FilterBy(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("FilterBy Property Test");
    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;
    debugger.Breakpoints.Add("", "Target001.cs", 15, 1, "",
        EnvDTE.dbgBreakpointConditionType.dbgBreakpointConditionTypeWhenTrue, "C#", "", 0, "", 0,
        EnvDTE.dbgHitCountType.dbgHitCountTypeNone);
    EnvDTE80.Breakpoint2 b2 = (EnvDTE80.Breakpoint2)debugger.Breakpoints.Item(1);
    b2.FilterBy = "MachineName == " + "MyMachine" + " & " +
                  "ProcessID == " + "1000" + " & " +
                  "ProcessName == " + "NewProcess";
    string strFilterBy = b2.FilterBy.ToString();

    owp.OutputString(strFilterBy + "\n");
}

Sicurezza di .NET Framework

Vedere anche

Riferimenti

Breakpoint2 Interfaccia

Spazio dei nomi EnvDTE80

Altre risorse

Procedura: compilare ed eseguire gli esempi di codice del modello a oggetti di automazione