From 25695e9d1ebabdb8f4059de593c6d382202d567b Mon Sep 17 00:00:00 2001 From: Aaron Date: Fri, 13 Dec 2024 13:37:04 -0500 Subject: [PATCH 1/3] don't hide pdb actions while executing --- spyder/plugins/debugger/widgets/main_widget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spyder/plugins/debugger/widgets/main_widget.py b/spyder/plugins/debugger/widgets/main_widget.py index 6176c3bc033..f29c52d20db 100644 --- a/spyder/plugins/debugger/widgets/main_widget.py +++ b/spyder/plugins/debugger/widgets/main_widget.py @@ -438,7 +438,7 @@ def update_actions(self): action = self.get_action(action_name) action.setEnabled(pdb_prompt) - self._set_visible_control_debugger_buttons(pdb_prompt) + self._set_visible_control_debugger_buttons(pdb_prompt or executing) rows = self.breakpoints_table.selectionModel().selectedRows() initial_row = rows[0] if rows else None From f7eb373dc064389fbbe52d5463a9ca304c360c4b Mon Sep 17 00:00:00 2001 From: Aaron Date: Fri, 13 Dec 2024 14:09:54 -0500 Subject: [PATCH 2/3] fix bug: actions shown while executing without debugging --- spyder/plugins/debugger/widgets/main_widget.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spyder/plugins/debugger/widgets/main_widget.py b/spyder/plugins/debugger/widgets/main_widget.py index f29c52d20db..3a52d2472e4 100644 --- a/spyder/plugins/debugger/widgets/main_widget.py +++ b/spyder/plugins/debugger/widgets/main_widget.py @@ -416,6 +416,7 @@ def update_actions(self): post_mortem = False executing = False pdb_prompt = False + is_debugging = False else: search_action.setEnabled(True) search_action.setChecked(widget.finder_is_visible()) @@ -423,6 +424,7 @@ def update_actions(self): sw = widget.shellwidget executing = sw._executing pdb_prompt = sw.is_waiting_pdb_input() + is_debugging = sw.is_debugging() enter_debug_action.setEnabled(post_mortem and not executing) interrupt_and_debug_action.setEnabled(executing) @@ -438,7 +440,8 @@ def update_actions(self): action = self.get_action(action_name) action.setEnabled(pdb_prompt) - self._set_visible_control_debugger_buttons(pdb_prompt or executing) + self._set_visible_control_debugger_buttons(pdb_prompt or + is_debugging) rows = self.breakpoints_table.selectionModel().selectedRows() initial_row = rows[0] if rows else None From ea50ce0f3f07e2be23e5443009a4b9f603f3260c Mon Sep 17 00:00:00 2001 From: Aaron Date: Sun, 15 Dec 2024 14:10:12 -0500 Subject: [PATCH 3/3] sytle change Co-authored-by: Carlos Cordoba --- spyder/plugins/debugger/widgets/main_widget.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spyder/plugins/debugger/widgets/main_widget.py b/spyder/plugins/debugger/widgets/main_widget.py index 3a52d2472e4..738b3bc65d5 100644 --- a/spyder/plugins/debugger/widgets/main_widget.py +++ b/spyder/plugins/debugger/widgets/main_widget.py @@ -440,8 +440,9 @@ def update_actions(self): action = self.get_action(action_name) action.setEnabled(pdb_prompt) - self._set_visible_control_debugger_buttons(pdb_prompt or - is_debugging) + self._set_visible_control_debugger_buttons( + pdb_prompt or is_debugging + ) rows = self.breakpoints_table.selectionModel().selectedRows() initial_row = rows[0] if rows else None