private void CleanUpRunners() { Logger.LogInfo("DetachFromDebugger", "Detach"); // Clear up all watch related data members. this.workerParams.CurrentVmState = null; this.currentWatchedMirror = null; this.currentWatchedStackValue = null; if (null != scriptRunner) { scriptRunner = null; } if (null != debugRunner) { debugRunner.Shutdown(); debugRunner = null; } if (null != internalWorker) { // @TODO(Ben): Perhaps cancellation is needed? internalWorker = null; } //Fix DG-1464973 Sprint25: rev 3444 : Multiple import issue - dispose core after execution //Core Cleanup should happen only after execution has finished, //DebugRunner is ShutDown. if (null != this.core) { this.core.Cleanup(); this.core = null; } workerParams.ResetStates(); SetExecutionState(ExecutionStateChangedEventArgs.States.None); }