public void Pause(bool debuggeeStateChanged) { try { if (this.SelectedThread == null && this.Threads.Count > 0) { this.SelectedThread = this.Threads[0]; } if (this.SelectedThread != null) { // Disable all steppers - do not Deactivate since function tracking still needs them foreach (Stepper s in this.SelectedThread.Steppers) { s.PauseWhenComplete = false; } this.SelectedThread.SelectedFunction = this.SelectedThread.LastFunctionWithLoadedSymbols; } if (debuggeeStateChanged) { DebugeeState oldDebugeeState = debugeeState; debugeeState = new DebugeeState(this); OnDebuggeeStateChanged(); if (oldDebugeeState != null) { oldDebugeeState.NotifyHasExpired(); } } OnDebuggingPaused(); if (PausedReason == PausedReason.Exception) { ExceptionEventArgs args = new ExceptionEventArgs(this, SelectedThread.CurrentException); OnExceptionThrown(args); if (args.Continue) { this.Continue(); } } } catch (System.Exception e) { } }
public void Pause(bool debuggeeStateChanged) { try { if (this.SelectedThread == null && this.Threads.Count > 0) { this.SelectedThread = this.Threads[0]; } if (this.SelectedThread != null) { // Disable all steppers - do not Deactivate since function tracking still needs them foreach(Stepper s in this.SelectedThread.Steppers) { s.PauseWhenComplete = false; } this.SelectedThread.SelectedFunction = this.SelectedThread.LastFunctionWithLoadedSymbols; } if (debuggeeStateChanged) { DebugeeState oldDebugeeState = debugeeState; debugeeState = new DebugeeState(this); OnDebuggeeStateChanged(); if (oldDebugeeState != null) { oldDebugeeState.NotifyHasExpired(); } } OnDebuggingPaused(); if (PausedReason == PausedReason.Exception) { ExceptionEventArgs args = new ExceptionEventArgs(this, SelectedThread.CurrentException); OnExceptionThrown(args); if (args.Continue) { this.Continue(); } } } catch(System.Exception e) { } }