Terry J. Reedy added the comment:

Pdb says "Running 'cont' or 'step' will restart the program" but it seems to 
restart on any recognized command other than 'h' and traps everything else.  I 
verified behavior on Win7 with ordinary syntax error 'a = = 1' on installed 
2.7.10 and 3.4.3.  Removed qualifiers from title.

Doc says
'''
python3 -m pdb myscript.py

When invoked as a script, pdb will automatically enter post-mortem debugging if 
the program being debugged exits abnormally. After post-mortem debugging (or 
after normal exit of the program), pdb will restart the program.'''

But not being able to exit could not have been the intention. Looking at the 
code.

----------
nosy: +georg.brandl, terry.reedy
stage:  -> test needed
title: python3 -mpdb gets stuck in an unexitable infinite prompt loop when 
running some Python 2 code with syntax errors -> python -m pdb error.py:  stuck 
in unexitable infinite prompt loop
versions: +Python 2.7, Python 3.5, Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24957>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to