[Python-il] debugging Python
Yitzhak.Wiener at dspg.com
Sun Jan 24 17:10:03 IST 2010
Thanks a lot
From: beni.cherniavsky at gmail.com [mailto:beni.cherniavsky at gmail.com] On
Behalf Of Beni Cherniavsky
Sent: Sunday, January 24, 2010 2:12 PM
To: Yitzhak Wiener
Cc: Python in Israel
Subject: Re: [Python-il] debugging Python
On Fri, Jan 22, 2010 at 17:18, Amit Aronovitch <aronovitch at gmail.com>
> In case you did not try that yet, using an interactive interpreter is
> tremendous help for testing out new ideas and especially when learning
> IDE's come with their own interactive prompts, but you always have the
> included python shell (just type "python" at the command line), as
> in most tutorials.
> Even easier solution - use ipython: has colors, improved history and
> much more.
IMHO, the interactive interpreter become tremendously more useful when
it multi-line history, so that you can type a whole loop or function
definition, try it out, and then recall and modify it with a single
Unfortunately, 90% of python environments don't do this (e.g. the
plain "python" interpreter) or do it wrong (e.g. ipython, which is is
great in all other respects)...
So I recommend you start out with IDLE which comes builtin with
Python. It's not very fancy, but it does get multi-line history
> IDE's also have graphic debuggers (probably built as wrappers around
> Do not have much experience with the python IDE's mentioned in
> posts. IDLE (the "standard" tk IDE included with python) has some
> support - single stepping and jumping through source files work
> last time I checked (long time ago) running programs with debug mode
> IDLE is quite slow and tends to get it stuck.
IDLE's GUI debugger sucks, don't use it. It's confusing and lets you
do only very basic stuff.
I still recommend you start with IDLE, due to its great interactive
Learn to use the command-line pdb in "post-mortem" mode:
All you need to get started debugging exceptions are "bt", "up",
"down" and "p <expression>" to check variables and test pieces of
If you must have a GUI debugger, see http://winpdb.org/about/.
P.S. if you use Windows, http://pythonxy.com is an excellent "fat"
distro which will give you tons of developement tools and packages,
with one install and easy updates.
P.P.S. see also http://stackoverflow.com/search?q=python+IDE. If you
are not famaliar with StackOverflow - you should be! Many questions
like this are already answered there, and if not, just ask them and
you'll get quality answers in hours, or sometimes minutes!
Beni Cherniavsky-Paskin <cben at users.sf.net>
DSP Group, Inc. automatically scans all emails and attachments using
MessageLabs Email Security System.
DSP Group, Inc. automatically scans all emails and attachments using MessageLabs Email Security System.
More information about the Python-il