Interactive terminal for inspecting the running state of a python program
Python has a great debugger in pdb, but sometimes you only want to inspect and buck about with the state. The pdb REPL is a bit inconvenient for that, so here’s a different approach. Instead of
import pdb pdb.set_trace()
This starts an interactive interpreter and exits the program when the interpreter ends. If you want to continue, run this in that interpreter
debugme.exit = False
The variables available in the interactive interpreter are the locals and globals of the frame you imported debugme from.