summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/pyshell.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-01-28 23:38:19 (GMT)
committerGitHub <noreply@github.com>2021-01-28 23:38:19 (GMT)
commit6d87dec5818667168cc7e4ad972dde8aeec6d900 (patch)
treef60ff3af4aa967dc8df5f071c4dca6c38021a27f /Lib/idlelib/pyshell.py
parente9c6c26aff08e4c7bc6f1e8015cdd8edcc92dbef (diff)
downloadcpython-6d87dec5818667168cc7e4ad972dde8aeec6d900.zip
cpython-6d87dec5818667168cc7e4ad972dde8aeec6d900.tar.gz
cpython-6d87dec5818667168cc7e4ad972dde8aeec6d900.tar.bz2
bpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163)
Starting stack viewer when user code is running, including when Debugger is active, hangs or crashes IDLE. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit 23a567c11ca36eedde0e119443c85cc16075deaf) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Diffstat (limited to 'Lib/idlelib/pyshell.py')
-rwxr-xr-xLib/idlelib/pyshell.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py
index d32106c..fea3762 100755
--- a/Lib/idlelib/pyshell.py
+++ b/Lib/idlelib/pyshell.py
@@ -989,6 +989,10 @@ class PyShell(OutputWindow):
self.showprompt()
self.set_debugger_indicator()
+ def debug_menu_postcommand(self):
+ state = 'disabled' if self.executing else 'normal'
+ self.update_menu_state('debug', '*tack*iewer', state)
+
def beginexecuting(self):
"Helper for ModifiedInterpreter"
self.resetoutput()