Python pdb

From wikinotes

pdb is python's official builtin debugger. It lets you step through your code line-by-line, testing values until you find a problem.

Usage

Commands

l list current position
bt print backtrace at current position
c continue to next line (do not recurse into called)
s step into current line (recurse into it)
enter repeat last command
h print help menu

launch from cli

python  -m pdb  test.py

launch from src

import pdb;pdb.set_trace()