The most useful pdb commands, along with their short forms, to keep in mind while working with the Python debugger are as follows:
Command |
Action |
args |
Prints the argument list of the current function |
break |
Creates a breakpoint (requires parameters) |
continue |
Continues program execution |
help |
Lists the commands (or help) for a command (as a parameter) |
jump |
Sets the next line to be executed |
list |
Prints the source code around the current line |
next |
Continues execution until the next line in the current function is reached or returns |
step |
Executes the current line, stopping at the first possible occasion |
pp |
Pretty-prints the value of the expression |
quit or exit |
Aborts from pdb |
return |
Continues execution until the current function returns |