Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-69004: Disable the IDLE Debugger menu item while user code runs (G…
…H-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>
  • Loading branch information
2 people authored and miss-islington committed Sep 16, 2026
commit 31a9149203427e4a056da11205a8b78184c5d273
1 change: 1 addition & 0 deletions Lib/idlelib/idle_test/test_mainmenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def test_tcl_indexes(self):
# On failure, change pattern here and in function(s).
# Patterns here have '.*' for re instead of '*' for tcl.
for menu, pattern in (
('debug', '.*ebugger'), # PyShell.debug_menu_postcommand
('debug', '.*tack.*iewer'), # PyShell.debug_menu_postcommand
('options', '.*ode.*ontext'), # EW.__init__, CodeContext.toggle...
('options', '.*ine.*umbers'), # EW.__init__, EW.toggle...event.
Expand Down
1 change: 1 addition & 0 deletions Lib/idlelib/pyshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,7 @@ def open_debugger(self):

def debug_menu_postcommand(self):
state = 'disabled' if self.executing else 'normal'
self.update_menu_state('debug', '*ebugger', state)
self.update_menu_state('debug', '*tack*iewer', state)

def beginexecuting(self):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The Debugger item of the IDLE Debug menu is now disabled while user code
runs, like Stack Viewer.
Loading