Expression evaluation in break mode
The following section describes the process that occurs when the debugger is in break mode and must conduct expression evaluation.
Expression evaluation process
Following are the basic steps involved in evaluating an expression:
The session debug manager (SDM) calls IDebugStackFrame2::GetExpressionContext to get an expression context interface, IDebugExpressionContext2.
The SDM then calls IDebugExpressionContext2::ParseText with the string to be parsed.
If ParseText doesn't return S_OK, the reason for the error is returned.
-otherwise-
If ParseText does return S_OK, the SDM can then call either IDebugExpression2::EvaluateSync or IDebugExpression2::EvaluateAsync to get a final value from the parsed expression.
When using
IDebugExpression2::EvaluateSync
, the given callback interface communicates the ongoing process of the evaluation. The final value is returned in an IDebugProperty2 interface.When using
IDebugExpression2::EvaluateAsync
, the given callback interface communicates the ongoing process of the evaluation. Once the evaluation is complete, EvaluateAsync sends an IDebugExpressionEvaluationCompleteEvent2 interface through the callback. With this event interface, the final value results with GetResult.