UX: allow to enable/disable breakpoints when debugee is not running
authorJan Vrany <jan.vrany@labware.com>
Sat, 08 Jan 2022 13:33:44 +0000
changeset 249 1a76ea72b44b
parent 248 57722bcd0474
child 250 9691a13a1452
UX: allow to enable/disable breakpoints when debugee is not running CLI allows to enable/disable existing breakpoints even when debugee is finished or terminated. This fixes breakpoint list to allow the same.
VDBBreakpointPresenter.st
--- a/VDBBreakpointPresenter.st	Fri Jan 07 20:31:24 2022 +0000
+++ b/VDBBreakpointPresenter.st	Sat Jan 08 13:33:44 2022 +0000
@@ -1,6 +1,7 @@
 "
 jv:vdb - Visual / VM Debugger
 Copyright (C) 2015-now Jan Vrany
+Copyright (C) 2022 LabWare
 
 This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
 
@@ -23,6 +24,7 @@
 "
 jv:vdb - Visual / VM Debugger
 Copyright (C) 2015-now Jan Vrany
+Copyright (C) 2022 LabWare
 
 This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
 
@@ -175,17 +177,19 @@
 !VDBBreakpointPresenter methodsFor:'menu-queries'!
 
 canDisable
-    ^ breakpoint enabled and: [breakpoint debugger selectedInferior isStopped]
+    ^ breakpoint enabled and: [breakpoint debugger selectedInferior isStopped or: [breakpoint debugger selectedInferior isRunning not ] ]
 
     "Created: / 05-02-2018 / 12:27:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 13-05-2019 / 10:38:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 08-01-2022 / 13:29:45 / Jan Vrany <jan.vrany@labware.com>"
 !
 
 canEnable
-    ^ breakpoint enabled not and: [breakpoint debugger selectedInferior isStopped]
+    ^ breakpoint enabled not and: [breakpoint debugger selectedInferior isStopped or: [breakpoint debugger selectedInferior isRunning not ] ]
 
     "Created: / 05-02-2018 / 12:26:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 13-05-2019 / 10:38:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 08-01-2022 / 13:29:05 / Jan Vrany <jan.vrany@labware.com>"
 !
 
 isDisabled