Debuggers are very useful tools for analyzing the execution of programs; they allow you to pause your program while it is running and slowly step through the code line by line to see the flow of execution. You can also print out the values of each variable at each step of your program. The CodeHS Step Debugger is available for Python 3, Python 3 Graphics (tkinter), and Java(main) programs.
Turning on the Debugger
In the upper left corner of the code editor, open the editor Settings by clicking the gear icon
Turn on the debugger to enter debug mode.
Important Functions of the Debugger
The debugger has six available functions available:
Run: Run the program as usual, without the debugging tool
Step: Step to the next command to be executed. The next command can be in any file or an external library.
Next: Go to the next command in the current file.
Continue: Continue running the program until the program finishes or crashes.
Stop: Stop running the program
Delete: Clear the console
These tutorials will walk you through every step in using the debugger:
For Java programs, check out Using the Java Debugger.
For Python 3 and Python 3 Graphics (tkinter) programs, check out Using the Python Debugger.
Webinar: Using the Step-by-Step Debugger
Hosted on September 8th, 2021.
Still have questions? Contact our team at firstname.lastname@example.org to learn more!