[Tutor] Souce Debuger

alan.gauld@bt.com alan.gauld@bt.com
Sun, 4 Nov 2001 22:56:39 -0000


> Is there anything comprable to gdb for python? 

No, but there are several feeble minded debuggers that you
can use. However none come even close to gdb's power.

Python includes the pdb module from which you can run
your program, set breakpoints, watches and step thru'

IDLE includes a GUI front end but with some limitations
in functionality.

Pythonwin provides a fdfferent and IMHO superior debugger 
if you are on windows.

THe other IDEs likely do likewise.

My beginners book (not the web pages yet) has a chapter 
on debugging Python and Programming Python by Lutz had 
a similar chapter (at least in the first edition!)

> large program, and cutting and pasting into the interp is a 
> lot of work.

You should be able to import the program and then create 
objects, call functions/methods etc that way - provided 
you used the 

if __name__ == "__main__": 

trick.

Alan G