public async Task LldbEvalWithContextVarsAsync() { _optionPageGrid.ExpressionEvaluationEngine = ExpressionEvaluationEngineFlag.LLDB_EVAL_WITH_FALLBACK; RemoteValue mockVariable = CreateMockVariable(); var natvisScope = new NatvisScope(); var contextVar = RemoteValueFakeUtil.CreateSimpleInt("var", 14); natvisScope.AddScopedName("var", "$var_0"); natvisScope.AddContextVariable("$var_0", contextVar); await _evaluator.EvaluateExpressionAsync( "2 + var", _varInfoFactory.Create(mockVariable), natvisScope, "result"); await mockVariable.Received(1).EvaluateExpressionLldbEvalAsync( Arg.Is("2 + $var_0"), Arg.Is(natvisScope.ContextVariables)); Assert.That(natvisScope.ContextVariables.Count, Is.EqualTo(1)); Assert.That(natvisScope.ContextVariables.ContainsKey("$var_0")); Assert.That(natvisScope.ContextVariables["$var_0"], Is.EqualTo(contextVar)); await mockVariable.DidNotReceive().EvaluateExpressionAsync(Arg.Any <string>()); }