|
|
@ -319,28 +319,26 @@ namespace ICSharpCode.ILSpy |
|
|
|
if (window.ShowDialog() == true) |
|
|
|
if (window.ShowDialog() == true) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (DebuggerService.CurrentDebugger.IsDebugging) { |
|
|
|
if (DebuggerService.CurrentDebugger.IsDebugging) { |
|
|
|
AttachMenuItem.IsEnabled = AttachButton.IsEnabled = false; |
|
|
|
EnableDebuggerUI(false); |
|
|
|
ContinueDebuggingMenuItem.IsEnabled = |
|
|
|
DebuggerService.CurrentDebugger.DebugStopped += OnDebugStopped; |
|
|
|
StepIntoMenuItem.IsEnabled = |
|
|
|
|
|
|
|
StepOverMenuItem.IsEnabled = |
|
|
|
|
|
|
|
StepOutMenuItem.IsEnabled = |
|
|
|
|
|
|
|
DetachMenuItem.IsEnabled = true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void OnDebugStopped(object sender, EventArgs e) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
EnableDebuggerUI(true); |
|
|
|
|
|
|
|
DebuggerService.CurrentDebugger.DebugStopped -= OnDebugStopped; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void DetachFromProcessExecuted(object sender, ExecutedRoutedEventArgs e) |
|
|
|
void DetachFromProcessExecuted(object sender, ExecutedRoutedEventArgs e) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (DebuggerService.CurrentDebugger.IsDebugging){ |
|
|
|
if (DebuggerService.CurrentDebugger.IsDebugging){ |
|
|
|
DebuggerService.CurrentDebugger.Detach(); |
|
|
|
DebuggerService.CurrentDebugger.Detach(); |
|
|
|
|
|
|
|
|
|
|
|
AttachMenuItem.IsEnabled = AttachButton.IsEnabled = true; |
|
|
|
EnableDebuggerUI(true); |
|
|
|
ContinueDebuggingMenuItem.IsEnabled = |
|
|
|
DebuggerService.CurrentDebugger.DebugStopped -= OnDebugStopped; |
|
|
|
StepIntoMenuItem.IsEnabled = |
|
|
|
|
|
|
|
StepOverMenuItem.IsEnabled = |
|
|
|
|
|
|
|
StepOutMenuItem.IsEnabled = |
|
|
|
|
|
|
|
DetachMenuItem.IsEnabled = false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -391,6 +389,16 @@ namespace ICSharpCode.ILSpy |
|
|
|
base.OnKeyUp(e); |
|
|
|
base.OnKeyUp(e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void EnableDebuggerUI(bool enable) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
AttachMenuItem.IsEnabled = AttachButton.IsEnabled = enable; |
|
|
|
|
|
|
|
ContinueDebuggingMenuItem.IsEnabled = |
|
|
|
|
|
|
|
StepIntoMenuItem.IsEnabled = |
|
|
|
|
|
|
|
StepOverMenuItem.IsEnabled = |
|
|
|
|
|
|
|
StepOutMenuItem.IsEnabled = |
|
|
|
|
|
|
|
DetachMenuItem.IsEnabled = !enable; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Exit/About
|
|
|
|
#region Exit/About
|
|
|
|