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 <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

Reply via email to