diff --git a/MonoDevelop.Debugger.Soft.Unity b/MonoDevelop.Debugger.Soft.Unity index 7f6946f..9660b8f 160000 --- a/MonoDevelop.Debugger.Soft.Unity +++ b/MonoDevelop.Debugger.Soft.Unity @@ -1 +1 @@ -Subproject commit 7f6946fd64cf11e4b46562802895d93231c0451c +Subproject commit 9660b8ff18b592bfb6853d87f3b6d2779dafb6ed diff --git a/UnityDebug/UnityDebugSession.cs b/UnityDebug/UnityDebugSession.cs index e6c3919..8dcdd81 100644 --- a/UnityDebug/UnityDebugSession.cs +++ b/UnityDebug/UnityDebugSession.cs @@ -800,6 +800,7 @@ public override void Threads(Response response, dynamic args) public override void Evaluate(Response response, dynamic args) { var expression = GetString(args, "expression"); + var frameId = GetInt(args, "frameId", 0); if (expression == null) { @@ -807,13 +808,14 @@ public override void Evaluate(Response response, dynamic args) return; } - if (Frame == null) + var frame = m_FrameHandles.Get(frameId, null); + if (frame == null) { SendError(response, "no active stackframe"); return; } - if (!Frame.ValidateExpression(expression)) + if (!frame.ValidateExpression(expression)) { SendError(response, "invalid expression"); return; @@ -822,7 +824,7 @@ public override void Evaluate(Response response, dynamic args) var evaluationOptions = m_DebuggerSessionOptions.EvaluationOptions.Clone(); evaluationOptions.EllipsizeStrings = false; evaluationOptions.AllowMethodEvaluation = true; - var val = Frame.GetExpressionValue(expression, evaluationOptions); + var val = frame.GetExpressionValue(expression, evaluationOptions); val.WaitHandle.WaitOne(); var flags = val.Flags;