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