Skip to content
Browse files

Show message when process is running and step action is requested.

  • Loading branch information...
1 parent 87ef097 commit 8496217ca6c1f47efbe71e8f28dced10556e8375 @eusebiu eusebiu committed
Showing with 18 additions and 3 deletions.
  1. +18 −3 src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs
View
21 src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs
@@ -505,8 +505,13 @@ public void StepInto()
return;
}
+ if (debuggedProcess.IsRunning) {
+ MessageService.ShowMessage(errorProcessRunning, "${res:XML.MainMenu.DebugMenu.StepInto}");
+ return;
+ }
+
var frame = debuggedProcess.SelectedStackFrame ?? debuggedProcess.SelectedThread.MostRecentStackFrame;
- if (frame == null || debuggedProcess.IsRunning) {
+ if (frame == null) {
MessageService.ShowMessage(errorCannotStepNoActiveFunction, "${res:XML.MainMenu.DebugMenu.StepInto}");
} else {
if (IsInExternalCode) {
@@ -525,8 +530,13 @@ public void StepOver()
return;
}
+ if (debuggedProcess.IsRunning) {
+ MessageService.ShowMessage(errorProcessRunning, "${res:XML.MainMenu.DebugMenu.StepOver}");
+ return;
+ }
+
var frame = debuggedProcess.SelectedStackFrame ?? debuggedProcess.SelectedThread.MostRecentStackFrame;
- if (frame == null || debuggedProcess.IsRunning) {
+ if (frame == null) {
MessageService.ShowMessage(errorCannotStepNoActiveFunction, "${res:XML.MainMenu.DebugMenu.StepOver}");
} else {
if (IsInExternalCode) {
@@ -545,8 +555,13 @@ public void StepOut()
return;
}
+ if (debuggedProcess.IsRunning) {
+ MessageService.ShowMessage(errorProcessRunning, "${res:XML.MainMenu.DebugMenu.StepOut}");
+ return;
+ }
+
var frame = debuggedProcess.SelectedStackFrame ?? debuggedProcess.SelectedThread.MostRecentStackFrame;
- if (frame == null || debuggedProcess.IsRunning) {
+ if (frame == null) {
MessageService.ShowMessage(errorCannotStepNoActiveFunction, "${res:XML.MainMenu.DebugMenu.StepInto}");
} else {
if (IsInExternalCode) {

0 comments on commit 8496217

Please sign in to comment.
Something went wrong with that request. Please try again.