diff --git a/src/AddIns/Debugger/Debugger.Core/Eval.cs b/src/AddIns/Debugger/Debugger.Core/Eval.cs
index c429adf549..828f153e3f 100644
--- a/src/AddIns/Debugger/Debugger.Core/Eval.cs
+++ b/src/AddIns/Debugger/Debugger.Core/Eval.cs
@@ -134,7 +134,7 @@ namespace Debugger
appDomain.Process.activeEvals.Add(this);
- appDomain.Process.AsyncContinue(DebuggeeStateAction.Keep);
+ appDomain.Process.AsyncContinue(DebuggeeStateAction.Keep, evalThread);
}
/// Evaluation can not be stopped
diff --git a/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs b/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs
index 0151f5e46f..b29d07e2b5 100644
--- a/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs
+++ b/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs
@@ -98,6 +98,7 @@ namespace Debugger
process.AsyncContinue(DebuggeeStateAction.Keep);
} else if (process.Evaluating) {
// Ignore events during property evaluation
+ pausedEventArgs = null;
process.AsyncContinue(DebuggeeStateAction.Keep);
} else if (pauseOnNextExit) {
// process.TraceMessage("Callback exit: Paused");
diff --git a/src/AddIns/Debugger/Debugger.Core/Process.cs b/src/AddIns/Debugger/Debugger.Core/Process.cs
index cab1ad89a0..ba27dccff5 100644
--- a/src/AddIns/Debugger/Debugger.Core/Process.cs
+++ b/src/AddIns/Debugger/Debugger.Core/Process.cs
@@ -459,12 +459,18 @@ namespace Debugger
AsyncContinue(DebuggeeStateAction.Clear);
}
- /// Null to keep current setting
- /// What happens to created threads. Null to keep current setting
- internal void AsyncContinue(DebuggeeStateAction action)
+ /// Run this thread and freeze all other threads
+ internal void AsyncContinue(DebuggeeStateAction action, Thread threadToRun = null)
{
AssertPaused();
+ if (threadToRun != null) {
+ corProcess.SetAllThreadsDebugState(CorDebugThreadState.THREAD_SUSPEND, null);
+ threadToRun.CorThread.SetDebugState(CorDebugThreadState.THREAD_RUN);
+ } else {
+ corProcess.SetAllThreadsDebugState(CorDebugThreadState.THREAD_RUN, null);
+ }
+
NotifyResumed(action);
corProcess.Continue(0);
// this.TraceMessage("Continue");