This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: pdb frames accessible after the termination occurs on uncaught exception
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, xdegaye
Priority: normal Keywords:

Created on 2013-01-24 17:18 by xdegaye, last changed 2022-04-11 14:57 by admin.

Messages (2)
msg180535 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2013-01-24 17:18
The following test illustrates the problem.
script.py contains the line "1 / 0".
The 'bt' command is also wrong.

$ python3 -m pdb script.py
> /tmp/script.py(1)<module>()
-> 1 / 0
(Pdb) continue
Traceback (most recent call last):
  File "/usr/local/lib/python3.3/pdb.py", line 1651, in main
    pdb._runscript(mainpyfile)
  File "/usr/local/lib/python3.3/pdb.py", line 1532, in _runscript
    self.run(statement)
  File "/usr/local/lib/python3.3/bdb.py", line 405, in run
    exec(cmd, globals, locals)
  File "<string>", line 1, in <module>
  File "/tmp/script.py", line 1, in <module>
    1 / 0
ZeroDivisionError: division by zero
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /tmp/script.py(1)<module>()
-> 1 / 0
(Pdb) up
> <string>(1)<module>()
(Pdb) up
> /usr/local/lib/python3.3/bdb.py(405)run()
-> exec(cmd, globals, locals)
(Pdb) up
> /usr/local/lib/python3.3/pdb.py(1532)_runscript()
-> self.run(statement)
(Pdb) up
> /usr/local/lib/python3.3/pdb.py(1651)main()
-> pdb._runscript(mainpyfile)
(Pdb) up
*** Oldest frame
(Pdb)
msg223237 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-16 17:40
Nosy list set according to experts page.
History
Date User Action Args
2022-04-11 14:57:40adminsetgithub: 61228
2019-04-26 19:47:53BreamoreBoysetnosy: - BreamoreBoy
2014-07-16 17:40:16BreamoreBoysetnosy: + georg.brandl, BreamoreBoy

messages: + msg223237
versions: + Python 3.5, - Python 3.3
2013-01-24 17:18:33xdegayecreate