New submission from ppperry: In IDLE: >>>def dodebug(): pdb.set_trace() >>>dodebug() --Return-- > <pyshell#6>(2)dodebug()->None (Pdb) s --Return-- > <pyshell#8>(1)<module>()->None (Pdb) s PDB should exit, but it doesn't > c:\python27\lib\idlelib\run.py(308)runcode() -> interruptable = False (Pdb)s > c:\python27\lib\idlelib\run.py(322)runcode() -> flush_stdout() Quitting from this state raises an error: (Pdb)q
Traceback (most recent call last): ** IDLE Internal Exception: File "C:\Python27\lib\idlelib\run.py", line 100, in main ret = method(*args, **kwargs) File "C:\Python27\lib\idlelib\run.py", line 322, in runcode flush_stdout() File "C:\Python27\lib\idlelib\run.py", line 322, in runcode flush_stdout() File "C:\Python27\lib\bdb.py", line 49, in trace_dispatch return self.dispatch_line(frame) File "C:\Python27\lib\bdb.py", line 68, in dispatch_line if self.quitting: raise BdbQuit BdbQuit The same example outside of IDLE: >>>def dodebug(): pdb.set_trace() >>>dodebug() --Return-- > <stdin>(1)dodebug()->None (Pdb) s --Return-- > <stdin>(1)<module>()->None (Pdb) s [clean pbd exit] >>> Note: this bug does not occur with pdb.run(). OS: Windows XP ---------- components: IDLE, Library (Lib) messages: 223342 nosy: ppperry priority: normal severity: normal status: open title: Pdb.set_trace debugging does not end correctly in IDLE versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21997> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com