다음을 통해 공유


Call Stack Evaluation

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

In order to view the stack frames of the call stack during break mode , you must implement the EnumFrameInfo method.

Methods for Evaluation

For a simple debug engine (DE), there might be only one stack frame. To examine the stack frame during break mode, you must implement the following methods of IDebugStackFrame2.

Method Description
GetCodeContext Gets the code context for a stack frame. The code context represents the current instruction pointer in a stack frame.
GetDocumentContext Gets the document context for a stack frame. The document context represents the current location in the source code for a stack frame. Required for viewing the source code when you are stopped in a program.

These methods require implementation of several context-related interfaces and methods. Thus, you must implement the GetDocumentContext method and the following methods of IDebugDocumentContext2.

Method Description
GetStatementRange Gets the file statement range of a document context.

To enumerate code contexts, you must implement all the methods of IEnumDebugCodeContexts2.

See Also

Execution Control and State Evaluation