IDLE

One hour you spend learning how to use a debugger will save you hundreds of hours of debugging in your life time as a programmer. A debugger makes a good programmer a better programmer. You will be a more efficient programmer by using the debugger to find problems. IDLE (Integrated DeveLopment Environment) is a commonly used integrated development environment for Python. It comes with an integrated debugger (see https://www.python.org/downloads/).

Click on Debug menu and then Debugger to enable the Python debugger from the shell.

 image011

You will see the following window:

image012

In the Python Shell, you will see:

image013

Run your code. For example, we run a program of finding the GCD.

image014

Click the Step button to run your code step by step. Then you can see the execution process of your code in the Debug Control window.

image015