Implement an expression evaluator
Important
In Visual Studio 2015, this way of implementing expression evaluators is deprecated. For information about implementing CLR expression evaluators, see CLR expression evaluators and Managed expression evaluator sample.
Evaluating an expression is a complex interplay among the debug engine (DE), the symbol provider (SP), the binder object, and the expression evaluator (EE). These four components are connected by interfaces that are implemented by one component and consumed by another.
The EE takes an expression from the DE in the form of a string and parses or evaluates it. The EE runs the following interfaces, which are consumed by the DE:
-
The EE calls the binder object, supplied by the DE, to get the value of symbols and objects. The EE consumes the following interfaces, which are implemented by the DE:
-
The EE runs IDebugProperty2.
IDebugProperty2
provides the mechanism for describing the result of an expression evaluation, such as a local variable, a primitive, or an object to Visual Studio, which then displays the appropriate information in the Locals, Watch, or Immediate window.The SP is given to the EE by the DE when it asks for information. The SP runs interfaces that describe addresses and fields, such as the following interfaces and their derivatives:
-
The EE consumes all of these interfaces.
In this section
Expression evaluator implementation strategy defines a three-step process for the expression evaluator (EE) implementation strategy.