Aracılığıyla paylaş


Breakpoint.DTE Özellik

Üst düzey bir geniþletilebilirlik nesnesi alır.

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

Sözdizimi

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

Özellik Değeri

Tür: EnvDTE.DTE
DTE nesnesi

Açıklamalar

Visual Studio, DTE nesnedir, diğer modelleri nesnesi Otomasyon modeli kök genellikle "Uygulama" çağrısı.

Örnekler

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

Bu özellik test etmek için:

  1. Bir kesme noktası hedef uygulamada ayarlayın.

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

public static void DTE(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("DTE Property Test: ");
    owp.Activate();

    // dte is a reference to the DTE object passed to you by the
    // OnConnection method that you implement when you create an add-in.
    DTE DTEProp = dte.Debugger.Breakpoints.Item(1).DTE ;
    owp.OutputString("Edition of the environment: " + DTEProp.Edition);
}
' Set a breakpoint in the target application. Run the application in the 
' debug mode.When the program stops at the breakpoint, run the add-in. 
Shared Sub DTEProperty(ByRef dte As EnvDTE.DTE)
    Dim DTEProp As DTE
    DTEProp = dte.Debugger.Breakpoints.Item(1).DTE
    MessageBox.Show("Edition of the environment: " + DTEProp.Edition)
End Sub

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Breakpoint Arabirim

EnvDTE Ad Alanı

Diğer Kaynaklar

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