diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2015-11-21 05:04:58 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2015-11-21 05:04:58 (GMT) |
commit | 76ced9972184645790fba038e2de4811d7d468ba (patch) | |
tree | ba35ee3bfa0ebade4423b2dd31ea3475dd3f9d95 /Lib | |
parent | 89bdf373c4fc5b28f0b62de8fee4c9fb97c35411 (diff) | |
download | cpython-76ced9972184645790fba038e2de4811d7d468ba.zip cpython-76ced9972184645790fba038e2de4811d7d468ba.tar.gz cpython-76ced9972184645790fba038e2de4811d7d468ba.tar.bz2 |
Issue 15348: Stop debugger engine (normally in user process)
before closing debugger window in IDLE process.
This prevents one-per-line RuntimeErrors.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/idlelib/Debugger.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/idlelib/Debugger.py b/Lib/idlelib/Debugger.py index 3f9e151..7fbe4a7 100644 --- a/Lib/idlelib/Debugger.py +++ b/Lib/idlelib/Debugger.py @@ -19,7 +19,7 @@ class Idb(bdb.Bdb): message = self.__frame2message(frame) try: self.gui.interaction(message, frame) - except (TclError, RuntimeError): + except TclError: # When closing debugger window with [x] in 3.x pass def user_exception(self, frame, info): @@ -105,10 +105,13 @@ class Debugger: self.interacting = 0 def close(self, event=None): + try: + self.quit() + except Exception: + pass if self.interacting: self.top.bell() return - self.abort_loop() if self.stackviewer: self.stackviewer.close(); self.stackviewer = None # Clean up pyshell if user clicked debugger control close widget. |