Debugger Confusion

Adriaan Renting renting at astron.nl
Thu Jun 30 05:20:22 EDT 2005


I use the debugger that comes with Eric3, but it is only free for Linux/
OS X, as it needs PyQt.
asside from setting  (conditional) breakpoints, one of it's features is
that it can show you a browsable tree of all your variables. something
like this:
class MyClass
|
L-- string 'username' - 'myuser'
|
L-- list
       L-[0] - 1
       L-[1] - 'some value'

You should know by now that I like this IDE ;-)

Adriaan Renting        | Email: renting at astron.nl
ASTRON                 | Phone: +31 521 595 217
P.O. Box 2             | GSM:   +31 6 24 25 17 28
NL-7990 AA Dwingeloo   | FAX:   +31 521 597 332
The Netherlands        | Web: http://www.astron.nl/~renting/
>>> "Robert Brewer" <fumanchu at amor.org> 06/28/05 11:02 PM >>>
Rex Eastbourne wrote:
> I'm a little confused about which debugging utilities do what, and
> which I should use for my Python code. I'd like to be able to step
> through my code, insert breakpoints, etc. I haven't been able to do
> this yet (I'm using Emacs on Windows). I have seen references to GDB,
> GUD, PDB, and others. Which ones do I need?

1. At the point you would like to start the debugger, insert the
following 2 lines:

    import pdb
    pdb.set_trace()

2. Run your script from the command line.
3. When your script executes the above lines, the pdb debugger will
start up, and give you a prompt. Type 'h' at the prompt (and hit
'enter'), and you'll be shown a list of pdb commands. 's' to step
through your code, 'c' to continue processing (and stop the debugger,
essentially). The prompt is interactive, so you can inspect program
variables as you like.

Start with that, and come back if you have any more questions. :)


Robert Brewer
System Architect
Amor Ministries
fumanchu at amor.org
-- 
http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list