Share via


Breakpoint2.FilterBy Propiedad

Definición

Obtiene o establece una condición en la que se establece un punto de interrupción.

public:
 property System::String ^ FilterBy { System::String ^ get(); void set(System::String ^ value); };
public:
 property Platform::String ^ FilterBy { Platform::String ^ get(); void set(Platform::String ^ value); };
[System.Runtime.InteropServices.DispId(1107)]
public string FilterBy { [System.Runtime.InteropServices.DispId(1107)] get; [System.Runtime.InteropServices.DispId(1107)] set; }
[<System.Runtime.InteropServices.DispId(1107)>]
[<get: System.Runtime.InteropServices.DispId(1107)>]
[<set: System.Runtime.InteropServices.DispId(1107)>]
member this.FilterBy : string with get, set
Public Property FilterBy As String

Valor de propiedad

Cadena que representa una condición en la que se establece un punto de interrupción.

Atributos

Ejemplos

En el ejemplo siguiente se muestra cómo usar la FilterBy propiedad .

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();  

     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");  
}  

Comentarios

Puede especificar una o varias condiciones en las que se establece un punto de interrupción. Usar &(AND), ||(OR), ! (NOT) y paréntesis para combinar las cláusulas siguientes:

MachineName == "machine"

ProcessID == 123

ProcessName = "process"

ThreadID = 123

ThreadName = "thread"

Si no se especifican condiciones, el punto de interrupción se establece en todos los procesos y subprocesos de cualquier máquina.

Se aplica a