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

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


You will see the following window:


In the Python Shell, you will see:


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


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.