[issue14743] on terminating, Pdb debugs itself

Xavier de Gaye report at bugs.python.org
Fri May 11 11:00:36 CEST 2012


Xavier de Gaye <xdegaye at gmail.com> added the comment:

The previous patch only fixed the problem when the debugger is started
from its main function. Uploaded new patch
pdb_botframe_default_3.patch that fixes pdb.main and the pdb.run*
function.

This patch also corrects pdb.runcall(): in the following session, the
3.1 debugger starts the debugging session at the second line of foo()
and not at the --Call-- event. A test case for this problem is also
included in the patch.


===   main.py   =================================
import pdb, sys
print(sys.version)

def foo():
    pass

pdb.runcall(foo)
=================================================
$ python3.1 main.py
3.1.2 (r312:79147, Apr  4 2010, 17:46:48) 
[GCC 4.3.2]
> /path_to/main.py(5)foo()
-> pass
(Pdb) quit
=================================================

----------
Added file: http://bugs.python.org/file25535/pdb_botframe_default_3.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14743>
_______________________________________


More information about the Python-bugs-list mailing list