[issue16180] cannot quit pdb when there is a syntax error in the debuggee (must kill it)

Xavier de Gaye report at bugs.python.org
Tue Oct 9 21:33:24 CEST 2012


New submission from Xavier de Gaye:

$ tmp=`mktemp /tmp/foo.XXXXXXXXXX`; echo 'def foo: pass' > $tmp; python3 -m pdb $tmp; rm $tmp
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/pdb.py", line 1556, in main
    pdb._runscript(mainpyfile)
  File "/usr/local/lib/python3.2/pdb.py", line 1437, in _runscript
    self.run(statement)
  File "/usr/local/lib/python3.2/bdb.py", line 392, in run
    exec(cmd, globals, locals)
  File "<string>", line 1, in <module>
  File "/tmp/foo.iLhPYHBZrF", line 1
    def foo: pass
           ^
SyntaxError: invalid syntax
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> <string>(1)<module>()
(Pdb) quit
Post mortem debugger finished. The /tmp/foo.iLhPYHBZrF will be restarted
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/pdb.py", line 1556, in main
    pdb._runscript(mainpyfile)
  File "/usr/local/lib/python3.2/pdb.py", line 1437, in _runscript
    self.run(statement)
  File "/usr/local/lib/python3.2/bdb.py", line 392, in run
    exec(cmd, globals, locals)
  File "<string>", line 1, in <module>
  File "/tmp/foo.iLhPYHBZrF", line 1
    def foo: pass
           ^
SyntaxError: invalid syntax
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> <string>(1)<module>()
(Pdb) --KeyboardInterrupt--
(Pdb)

----------
components: Library (Lib)
messages: 172508
nosy: xdegaye
priority: normal
severity: normal
status: open
title: cannot quit pdb when there is a syntax error in the debuggee (must kill it)
type: behavior
versions: Python 3.2

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


More information about the Python-bugs-list mailing list