Debugging Python With PDB

  • p <expression>
  • Prints the value of the expression in its current context
  • n
  • Executes the current line and moves on to the next line of code in the current function
  • s
  • Executes the current line and stops at the next opportunity, whether that is the next line in the current function or the first line in a function that is called
  • c
  • Continues execution of the code until it either hits another breakpoint or returns
  • q
  • Quits the debugger and the code being executed is aborted

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Bixly Inc.

Bixly Inc.

Python/JS developers ready to work with you! California-based software development.