The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at IDebugStackFrame2.

This interface represents a single stack frame in a call stack in a particular thread.

IDebugStackFrame2 : IUnknown  

The debug engine (DE) implements this interface to represent a stack frame.

Call EnumFrameInfo to retrieve an IEnumDebugFrameInfo2 interface. Call Next to retrieve a FRAMEINFO structure that contains the IDebugStackFrame2 interface.

The following table shows the methods of IDebugStackFrame2.

GetCodeContextGets the code context for this stack frame.
GetDocumentContextGets the document context for this stack frame.
GetNameGets the name of the stack frame.
GetInfoGets a description of the stack frame.
GetPhysicalStackRangeGets a machine-dependent representation of the range of physical addresses associated with a stack frame.
GetExpressionContextGets an evaluation context for doing expression evaluation within the current context of a stack frame and thread.
GetLanguageInfoGets the language associated with a stack frame.
GetDebugPropertyGets a description of the properties associated with a stack frame.
EnumPropertiesCreates an enumerator for stack frame properties.
GetThreadGets the thread associated with a stack frame.

This interface is obtained only when the program being debugged has been stopped at a breakpoint (either caused by a user-set breakpoint or an exception). From this interface, an expression context can be obtained to evaluate expressions, a list of registers can be returned, or the call stack can be obtained and examined.

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

Core Interfaces