You can run your program into pdb from the command line by running
python -m pdb your_script.py
This will stop execution at line 1, now set breakpoint with b linenumber
e.g. b 25
. Now type run
it will run the program until that break point.