ipython ipdb, when invoked via ipdb.set_trace(), does not remember the command history while debugging
问题 iPython does remember the command history if I run ipython 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 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 Which is to set