0

If you execute a statement that results in an exception in pdb you get the exception but the traceback for the exception is hidden.

Is there a way of getting pdb to output the exception?

Unfortunately neither sys.exc_info() or !sys.exc_info seems to contain the exception for for the last executed command. One seems to point to the exception that triggered the pdb post mortem. The other is an exception from within pdb. It'd also be nice to always get it to do the right thing.

Att Righ
  • 1,439
  • 1
  • 16
  • 29
  • Does this answer your question? [Get last exception in pdb](https://stackoverflow.com/questions/19211034/get-last-exception-in-pdb) – Yevhen Kuzmovych Dec 14 '22 at 17:20
  • Unfortunately neither `sys.exc_info()` or `!sys.exc_info` seems to contain the exception for for the last executed command. One seems to point to the exception that triggered the pdb post mortem. The other is an exception from within pdb. – Att Righ Dec 14 '22 at 17:32

0 Answers0