Key expression evaluator interfaces

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

Important

In Visual Studio 2015, this way of implementing expression evaluators is deprecated. For information about implementing CLR expression evaluators, please see CLR expression evaluators and Managed expression evaluator sample.

When writing an expression evaluator (EE), along with the evaluation context, you should be familiar with the following interfaces.

Interface descriptions

  • IDebugAddress

    Has a single method, GetAddress, which gets a data structure that represents the current point of execution. This data structure is one of the three arguments that the debug engine (DE) passes to the EvaluateSync method to evaluate an expression. This interface is typically implemented by the symbol provider.

  • IDebugBinder

    Has the Bind method, which gets the memory area that contains the current value of a symbol. Given both the containing method, represented by an IDebugObject object, and the symbol itself, represented by an IDebugField object, IDebugBinder::Bind returns the value of the symbol. IDebugBinder is typically implemented by the DE.

  • IDebugField

    Represents a simple data type. For more complex types, such as arrays and methods, use the derived IDebugArrayField and IDebugMethodField interfaces, respectively. IDebugContainerField is another important derived interface that represents symbols containing other symbols, like methods or classes. The IDebugField interface (and its derivatives) is typically implemented by the symbol provider.

    An IDebugField object can be used to find the name and type of a symbol and, together with an IDebugBinder object, can be used to find its value.

  • IDebugObject

    Represents the actual bits of the run-time value of a symbol. Bind takes an IDebugField object, which represents a symbol, and returns an IDebugObject object. The GetValue method returns the value of the symbol in a memory buffer. A DE typically implements this interface to represent the value of a property in memory.

  • IDebugExpressionEvaluator

    This interface represents the expression evaluator itself. The key method is Parse, which returns an IDebugParsedExpression interface.

  • IDebugParsedExpression

    This interface represents a parsed expression ready to be evaluated. The key method is EvaluateSync which returns an IDebugProperty2 representing the value and type of the expression.

  • IDebugProperty2

    This interface represents a value and its type and is the result of an expression evaluation.

See also