>From fcdd06e6fb62d0c009c27270d407b3b248cd1758 Mon Sep 17 00:00:00 2001 From: Gwenael Casaccio Date: Mon, 21 Oct 2013 11:50:17 +0200 Subject: [PATCH] Stepping while the selected context is not the suspended one; execute the code to the selected context and does the step command. --- packages/visualgst/ChangeLog | 5 +++++ packages/visualgst/Debugger/GtkDebugger.st | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/packages/visualgst/ChangeLog b/packages/visualgst/ChangeLog index addf608..124e0ce 100644 --- a/packages/visualgst/ChangeLog +++ b/packages/visualgst/ChangeLog @@ -1,5 +1,10 @@ 2013-10-21 Gwenael Casaccio + * Debugger/GtkDebugger.st: If stepping while the last context is not selected it finishes the execution + up to the selected context and does the stepping command. + +2013-10-21 Gwenael Casaccio + * Debugger/GtkDebugger.st: Code can be changed in the debugger. 2013-10-21 Gwenael Casaccio diff --git a/packages/visualgst/Debugger/GtkDebugger.st b/packages/visualgst/Debugger/GtkDebugger.st index e629a29..6420e8d 100644 --- a/packages/visualgst/Debugger/GtkDebugger.st +++ b/packages/visualgst/Debugger/GtkDebugger.st @@ -285,6 +285,7 @@ GtkBrowsingTool subclass: GtkDebugger [ stepInto [ + self isLastContextSelected ifFalse: [ self stepToSelectedContext ]. debugger step. self updateContextWidget ] @@ -292,6 +293,7 @@ GtkBrowsingTool subclass: GtkDebugger [ stepOver [ + self isLastContextSelected ifFalse: [ self stepToSelectedContext ]. debugger next. self updateContextWidget ] @@ -299,6 +301,7 @@ GtkBrowsingTool subclass: GtkDebugger [ stepOut [ + self isLastContextSelected ifFalse: [ self stepToSelectedContext ]. debugger finish. self updateContextWidget ] @@ -310,6 +313,15 @@ GtkBrowsingTool subclass: GtkDebugger [ debugger continue ] + stepToSelectedContext [ + + + | ctxt | + ctxt := debugger suspendedContext. + [ ctxt parentContext == contextWidget selectedContext ] whileFalse: [ ctxt := ctxt parentContext ]. + debugger finish: ctxt + ] + codeSaved [ @@ -438,6 +450,12 @@ GtkBrowsingTool subclass: GtkDebugger [ PrintItCommand executeOn: self ] + isLastContextSelected [ + + + ^ contextWidget selectedContext == debugger suspendedContext + ] + hasChanged [ -- 1.8.3.2