Debugging in IDLE

When you run code in IDLE's interactive mode, it informs you of errors the same way you've seen when using interactive mode in a Terminal or shell window.

When you run code from the text editor, IDLE also informs you of errors. Depending on the kind of error and on your version of IDLE, the error message appears in a dialog box or in the Python Shell window.

You can use the IDLE debugger to step through your program in various ways and display the values of names. The IDLE debugger is shown in Figure 2-5.

Warning On the Mac OS, the IDLE debugger that comes with Python 2.4 and earlier has a bug(!). When you open the debugger window, you must immediately resize it; otherwise, IDLE will hang.

Diiws Caotr-i

__mJin__".ffflridj)t> (r, live nopt'Mff km^}

Quit v'SlWt StxiKt

■*

Clobkli

..hulls íl^-

■mKAii'i1 t_ Hn 1 b.iMnfc>

Kon»

..rtjnt..

'_mar_'

UnC.cr ibo di (HIIHIIh

igure 2-5: The IDLE debugger at work.

Was this article helpful?

0 0

Post a comment