IDLE includes a built-in debugger that allows you to execute your program one line at a time, making the debugger a valuable tool for finding bugs in your program. By running your program in debug mode, you can take as much time as you want to examine the values in the variables at any given point while the program is running.

In this appendix, you’ll learn about how the debugger works, then practice debugging a program from the book, and finally learn how to set breakpoints in your code for easier debugging.

How the Debugger Works

To enable IDLE’s debugger, click DebugDebugger in the interactive shell window. The Debug ...

Get Cracking Codes with Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.