title: ipython ipdb, when invoked via ipdb.set_trace(), does not remember the command history while debugging
body: <p>iPython does remember the command history if I run <code>ipython</code> normally, e.g. to mess around testing basic things in the repl, but I would like to be able to pull up the debugging commands from the previous debug session, and I am doing my debugging by simply running my program as normal, where the program contains </p>
  
  <pre><code>import ipdb
  def info(type, value, info):
      import traceback
      traceback.print_exception(type, value, info)
      ipdb.pm()
  
  import sys
  sys.excepthook = info
  trace = ipdb.set_trace
  </code></pre>
  
  <p>Which is to set it up so I can write <code>trace()</code> anywhere in my program to start debugging there when I run the program, or for it to automatically start postmortem debugging when it dies on its own. </p>
  
  <p>Python with iPython has been leaps and bounds beyond other languages when it comes to quick code/test iterations and I'm just so close to nirvana at this point... </p>