[issue21997] Pdb.set_trace debugging does not end correctly in IDLE
Xavier de Gaye
report at bugs.python.org
Sat Jul 19 12:37:00 CEST 2014
Xavier de Gaye added the comment:
Two issues here:
a) in IDLE, on a 'return' debug event in the main module, the step command does not end the debugging session.
b) in IDLE, BdbQuit is raised by the quit command when the debugger is started with pdb.set_trace().
I do not know IDLE, but a) seems closely related to issue 14743: "on terminating, Pdb debugs itself".
As for b) BdbQuit is also raised outside of IDLE (see also issue 16446: "pdb raises BdbQuit on 'quit' when started with set_trace"):
>>> def dodebug():
... import pdb; pdb.set_trace()
...
>>> dodebug()
--Return--
> <stdin>(2)dodebug()->None
(Pdb) quit
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 2, in dodebug
File "/usr/local/lib/python3.5/bdb.py", line 52, in trace_dispatch
return self.dispatch_return(frame, arg)
File "/usr/local/lib/python3.5/bdb.py", line 96, in dispatch_return
if self.quitting: raise BdbQuit
bdb.BdbQuit
----------
nosy: +xdegaye
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21997>
_______________________________________
More information about the Python-bugs-list
mailing list