Is there any way to make a python program start an interactive debugger, like what import pdb; pdb.set_trace() instead of actually throwing an exception?
import pdb; pdb.set_trace()
I
If you are inside the REPL, you can do
import sys import pdb pdb.post_mortem(sys.last_traceback)
See https://docs.python.org/2/library/pdb.html and https://docs.python.org/3/library/traceback.html