Frequently-used pdb commands

May 11, 2025

You can now use breakpoint() directly to explicitly set a breakpoint in your code, instead of import pdb first and then call pdb.set_trace().

  • show current frame stack: w (gdb equivalent f)
  • continue just before function returns r (return, gdb equivalent finish)