Browse Source

fix SD-1846 - Changing debugger options during debug causes exception

pull/18/head
Siegfried Pammer 14 years ago
parent
commit
d522c97774
  1. 9
      src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml.cs

9
src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml.cs

@ -51,8 +51,17 @@ namespace Debugger.AddIn.Options @@ -51,8 +51,17 @@ namespace Debugger.AddIn.Options
{
bool result = base.SaveOptions();
Process proc = WindowsDebugger.CurrentProcess;
// debug session is running
if (proc != null) {
bool wasPausedNow = false;
// if it is not paused, break execution
if (!proc.IsPaused) {
proc.Break();
wasPausedNow = true;
}
proc.Debugger.ResetJustMyCodeStatus();
// continue if it was not paused before
if (wasPausedNow) proc.AsyncContinue();
}
return result;
}

Loading…
Cancel
Save