the obvious way to debug a script
python -m pdb script.py
- useful when that script raises an exception
- useful when using virtualenv and pdb command is not running with the venvs python version.
if you don't know exactly where that script is
python -m pdb ``which ``