次の方法で共有


IDebugExpressionContext2

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. 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

This interface represents a context for expression evaluation.

Syntax

IDebugExpressionContext2 : IUnknown

Notes for Implementers

The debug engine (DE) implements this interface to represent a context in which an expression can be evaluated.

Notes for Callers

A call to GetExpressionContext returns the this interface. This interface is accessible only when the program being debugged has been paused and a stack frame is available.

Methods in Vtable Order

The following table shows the methods of IDebugExpressionContext2.

Method Description
GetName Retrieves the name of the evaluation context.
ParseText Parses a text-based expression for evaluation.

Remarks

An evaluation context can be thought of as a scope for performing expression evaluation.

When a program has halted, the session debug manager (SDM) obtains a stack frame from the DE with a call to EnumFrameInfo. The SDM then calls GetExpressionContext to get the IDebugExpressionContext2 interface. This is followed by a call to ParseText to create an IDebugExpression2 interface, which represents the parsed expression ready to be evaluated.

Requirements

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

See also