Is there a way to examine the last exception when in pdb/before entering pdb? (Using python 2.7.5).
Immediately (yes, I enter no other commands at all) after an exception being raised in my code, I do sys.exc_info()
; this just results in (None, None, None)
. At this point, I can do pdb.pm()
, and pdb starts at the point that the exception is raised.
I'd like to be able to examine this exception object (it is not stored in a variable before being raised).
There is nothing obviously helpful in http://docs.python.org/2/library/pdb.html or http://docs.python.org/2/library/sys.html
Edit: I know about set_trace
. I'd like to examine the exception before I modify the code.