views:

99

answers:

1

I've got python script (ala #! /usr/bin/python) and I want to debug it with pdb. How can I pass arguments to the script?

+5  A: 
python -m pdb myscript.py arg1 arg2 ...

This invokes pdb as a script to debug another script. You can pass command-line arguments after the script name. See the pdb doc page for more details.

Ayman Hourieh