Skip to content

Debugging Python

breakpoint()

or start a file with PDB

python -m pdb file.py

pudb

Visual pdb

useful for debugging in a container - when an IDE debugger might get out of sync

  1. pip install pudb
  2. import pudb; pu.db
    1. in the source code
    2. instead of breakpoint()

Last update: 2023-02-03