Python debugging
From Andrej Karpathy:
debugging in Python:
print()s alone: too simpleimport pdb; pdb.set_trace(): too compleximport code; code.interact(local=locals()): just right simply drops you into interpreter, perfect for 95% of debugging
Tutorial: How To Debug Python with an Interactive Console.
There’s also breakpoint():
Python breakpoint().