With a single breakpoint to enter the Python Debugger (Pdb), we can traverse through the execution flow of source code, printing out variables, moving up and down the stack of frames.

Some commonly used commands are b (list breaks or set a break), ll (list the whole source code of current function or frame), n (continue execution until the next line in the current function is reached or it returns just like execute/step over one line of code), s (execute the current line and stop at the first possible occasion just like step into one line of code), unt (continue execution until the line with a number greater than the current one is reached and this is often used to fast-forward loop iterations), p (print the value of an expression), w (print the current stack trace), u (move one frame up in the stack trace), and d (move one frame down in the stack trace).

References