Skip to content

Commit bf75c3e

Browse files
miss-islingtonserhiy-storchakaclaude
authored
[3.14] gh-69004: Disable the IDLE Debugger menu item while user code runs (GH-157599) (#157603)
gh-69004: Disable the IDLE Debugger menu item while user code runs (GH-157599) Like Stack Viewer since GH-17163, instead of a "Don't debug now" box. (cherry picked from commit 2f04bda) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent d6375c3 commit bf75c3e

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/idlelib/idle_test/test_mainmenu.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def test_tcl_indexes(self):
2222
# On failure, change pattern here and in function(s).
2323
# Patterns here have '.*' for re instead of '*' for tcl.
2424
for menu, pattern in (
25+
('debug', '.*ebugger'), # PyShell.debug_menu_postcommand
2526
('debug', '.*tack.*iewer'), # PyShell.debug_menu_postcommand
2627
('options', '.*ode.*ontext'), # EW.__init__, CodeContext.toggle...
2728
('options', '.*ine.*umbers'), # EW.__init__, EW.toggle...event.

Lib/idlelib/pyshell.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,7 @@ def open_debugger(self):
10991099

11001100
def debug_menu_postcommand(self):
11011101
state = 'disabled' if self.executing else 'normal'
1102+
self.update_menu_state('debug', '*ebugger', state)
11021103
self.update_menu_state('debug', '*tack*iewer', state)
11031104

11041105
def beginexecuting(self):
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The Debugger item of the IDLE Debug menu is now disabled while user code
2+
runs, like Stack Viewer.

0 commit comments

Comments
 (0)