We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

StackFrames.DTE Property

Gets the top-level extensibility object.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

DTE DTE { get; }

Property Value

Type: EnvDTE.DTE
A DTE object.

In Visual Studio, the DTE is the root of the automation model, which other object models often call "Application."

The following example demonstrates how to use the DTE property.

To test this property:

  1. Set a breakpoint in your target application.

  2. Run the target application in the debug mode.

  3. When the application stops on the breakpoint, run the add-in.

public static void StackFramesDTE(DTE dte)
{
    EnvDTE.StackFrames stackFrames = dte.Debugger.CurrentThread.StackFrames;
    MessageBox.Show("\nEdition of the environment: " + 
                    stackFrames.DTE.Edition, "Stack Frames DTE Property Test");
}

Show: