Next / Previous / Contents / TCC Help System / NM Tech homepage

27.1. Starting up pdb

To execute any Python statement under the control of pdb:

>>> import pdb
>>> import yourModule
>>>'yourModule.test()')  # Or any other statement

where contains the source code you want to debug.

To debug a Python script named

python /usr/lib/python2.5/

To perform post-mortem analysis:

>>> import pdb
>>> import yourModule
>>> yourModule.test()
[crash traceback appears here]

Then you can type debugger commands at the (pdb) prompt.