python debugging question

Xavier Morel xavier.morel at
Wed Mar 8 22:54:56 CET 2006

diffuser78 at wrote:
> I am a python newbie. I have writen some 500 lines of code. There are 4
> classes and in all 5 files.
> Now, I am trying to run the program. I am getting wrong values for the
> simulation results.
> Is there any debugging facilities in python which would let me go step
> by step and check the values of the variables at every step. I have
> done something like this in MS Visual Stdio 6.0 sometime back.
> For python, I am using SPE.
> what is a good way of debugging such large and iterative programs ? Any
> tips.
> Every help is appreciated.
> Thanks
Check the PDB standard package, reading Debugging in Python 
( may also help.

And I think SPE provides WinPDB, check the user manual.

I'd suggest trying to work out why it doesn't work at a higher level 
instead of relying on the debugger already, 500 lines is not much code 
to go through, a few well placed prints or sys.stderr.write() should be 
more than enough.

More information about the Python-list mailing list