Breakpoint2.Enabled Özellik
Ayarlar veya kesme noktası etkinleştirilmiş durumu döndürür.
Ad alanı: EnvDTE80
Derleme: EnvDTE80 (EnvDTE80.dll içinde)
Sözdizimi
'Bildirim
Property Enabled As Boolean
Get
Set
bool Enabled { get; set; }
property bool Enabled {
bool get ();
void set (bool value);
}
abstract Enabled : bool with get, set
function get Enabled () : boolean
function set Enabled (value : boolean)
Özellik Değeri
Tür: System.Boolean
Bir boolean değeri true etkinse kesme, aksi halde false.
Yüklenen
Örnekler
Aşağıdaki örnek, nasıl kullanılacağını gösterir Enabled özelliği.
Bu özellik test etmek için:
Bir kesme noktası hedef uygulamada ayarlayın.
Eklentiyi çalıştırın.
Kesme noktası durumu etkindir.
Kesme noktası fareyi sağ kullanarak devre dışı bırakın.
Eklentiyi çalıştırın.
Kesme noktası durumu devre dışı bırakılır.
public static void Enabled(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("Enabled 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.
EnvDTE80.Debugger2 debugger = (EnvDTE80.Debugger2)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);
}
Sub EnabledSamplesVB(ByVal dte As DTE2)
If MsgBox("Disable all breakpoints?", MsgBoxStyle.YesNo) _
= MsgBoxResult.Yes Then
Dim bp As Breakpoint
For Each bp In dte.Debugger.Breakpoints
bp.Enabled = False
Next
End If
End Sub
.NET Framework Güvenliği
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. kısmen güvenilir kod tarafından Kitaplıklar kullanma.
Ayrıca bkz.
Başvuru
Diğer Kaynaklar
Nasıl Yapılır: derlemek ve otomasyon nesne modeli kod örnekleri çalıştırma