From 02caed1288e466cad7ea7ce8fa10e7921451c75d Mon Sep 17 00:00:00 2001 From: "Lumberbot (aka Jack)" <39504233+meeseeksmachine@users.noreply.github.com> Date: Sun, 15 Dec 2024 13:50:50 -0800 Subject: [PATCH] Backport PR #23273 on branch 6.x (PR: Don't hide control debugger buttons from main toolbar while executing) (#23292) --- spyder/plugins/debugger/widgets/main_widget.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spyder/plugins/debugger/widgets/main_widget.py b/spyder/plugins/debugger/widgets/main_widget.py index 6176c3bc033..738b3bc65d5 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,9 @@ 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 is_debugging + ) rows = self.breakpoints_table.selectionModel().selectedRows() initial_row = rows[0] if rows else None