Share via


Breakpoint.DTE 속성

최상위 확장성 개체를 가져옵니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
ReadOnly Property DTE As DTE
DTE DTE { get; }
property DTE^ DTE {
    DTE^ get ();
}
abstract DTE : DTE with get
function get DTE () : DTE

속성 값

형식: EnvDTE.DTE
DTE 개체

설명

Visual Studio에서 DTE 개체는 자동화 모델의 루트이며 다른 개체 모델에서는 이를 "Application"이라고도 합니다.

예제

다음 예제에서는 DTE 속성을 사용하는 방법을 보여 줍니다.

이 속성을 테스트하려면

  1. 대상 응용 프로그램에 중단점을 설정합니다.

  2. 추가 기능을 실행합니다.

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 보안

참고 항목

참조

Breakpoint 인터페이스

EnvDTE 네임스페이스

기타 리소스

방법: 자동화 개체 모델 코드의 예제 컴파일 및 실행