How to do it...

  1. To enable the debugger, start IDLE3 and select Debugger from the Debug menu; it will open up the following window (if you are currently running some code, you will need to stop it first):
The IDLE3 debugger window
  1. Open up the code you want to test (via File | Open...) and try running it (F5). You will find that the code will not start since the debugger has automatically stopped at the first line. The following screenshot shows that the debugger has stopped on the first line of code in filehandler.py, which is line 3: import os:
The IDLE3 debugger at the start of the code

Get Raspberry Pi 3 Cookbook for Python Programmers - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.