Breakpoint.Enabled Eigenschaft

Definition

Legt den Aktivierungsstatus des Breakpoint-Objekts fest oder ruft diesen ab.Sets or gets the enabled state of this Breakpoint object.

public:
 property bool Enabled { bool get(); void set(bool value); };
public:
 property bool Enabled { bool get(); void set(bool value); };
[System.Runtime.InteropServices.DispId(113)]
public bool Enabled { [System.Runtime.InteropServices.DispId(113)] get; [System.Runtime.InteropServices.DispId(113)] set; }
[<System.Runtime.InteropServices.DispId(113)>]
[<get: System.Runtime.InteropServices.DispId(113)>]
[<set: System.Runtime.InteropServices.DispId(113)>]
member this.Enabled : bool with get, set
Public Property Enabled As Boolean

Eigenschaftswert

Boolean

Ein boolescher Wert, der angibt, ob dieses t:EnvDTE.Breakpoint -Objekt aktiviert ist.A Boolean value representing whether this T:EnvDTE.Breakpoint object is enabled or not.

Attribute

Beispiele

Im folgenden Beispiel wird die Verwendung der- Enabled Eigenschaft veranschaulicht.The following example demonstrates how to use the Enabled property.

public static void Enabled(DTE 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("Enabled Property Test: ");  
    owp.Activate();  
    EnvDTE.Debugger debugger = (EnvDTE.Debugger)dte.Debugger;  
    owp.OutputString("Breakpoint in the file " + debugger.Breakpoints.Item(1).File);  
    owp.OutputString(" on line " +   
                     debugger.Breakpoints.Item(1).FileLine.ToString() + " column ");  
    owp.OutputString(debugger.Breakpoints.Item(1).FileColumn.ToString() + " is ");  
    owp.OutputString(debugger.Breakpoints.Item(1).Enabled ? "enabled." : "disabled.");  
    owp.OutputString("\nThis breakpoint is in the function: " +   
                     debugger.Breakpoints.Item(1).FunctionName);  
}  
Shared Sub Enabled(ByRef dte As EnvDTE.DTE)  
    Dim strFile As String  
    Dim strFileLine As String  
    Dim strFileColumn As String  
    Dim strEnabled As String  
    Dim boolEnabled As Boolean  

    dte.Debugger.StepInto(True)  
    dte.Debugger.Breakpoints.Add("", "Target001.cs", 15, 1, "", _  
                                 EnvDTE.dbgBreakpointConditionType.dbgBreakpointConditionTypeWhenTrue, _  
                                 "C#", "", 0, "", 0, EnvDTE.dbgHitCountType.dbgHitCountTypeNone)  
    strFile = dte.Debugger.Breakpoints.Item(1).File.ToString()  
    strFileLine = dte.Debugger.Breakpoints.Item(1).FileLine.ToString()  
    strFileColumn = dte.Debugger.Breakpoints.Item(1).FileColumn.ToString()  
    boolEnabled = dte.Debugger.Breakpoints.Item(1).Enabled  
    If boolEnabled = True Then  
        strEnabled = "enabled"  
    Else  
        strEnabled = "disabled"  
    End If  

    MessageBox.Show("Breakpoint in the file " + strFile + vbCrLf + _  
                    "on line " + strFileLine + " column " + strFileColumn + _  
                    " is " + strEnabled + ".")  
End Sub  

Hinweise

Gibt zurück true , wenn der Breakpoint aktiviert ist, false andernfalls.Returns true if the breakpoint is enabled, false if not.

Gilt für: