Tools In the Code Editor
Click Docs in the Code Editor to see examples of all of the most important coding concepts that students have learned so far. The Docs tab is a great place to look for examples and check code syntax.
The History tab can be found under the More tab, located on the right side of the Code Editor. Clicking on History will allow students and teachers to view every previous version of the program.
If a program used to work but isn't working now, it can be helpful to look back at an earlier version of the program to see what changes have been made since then. By comparing the two versions, you might be able to spot what caused the problem in the current version.
Speed Slider and Step Debugger
Use the Speed Slider to run code more slowly so that students can pinpoint where the program gets off-track.
Use the Next and Last arrows, located at the top of the Code Editor to run code one line at a time to zero in on the exact line of code that is causing the error.
Comment Out Code
Comment out different sections of code, then re-run the code. When the code runs, the commented-out portions will be skipped, allowing students to use a process of elimination to target the portion of code that is causing an error.
Check the Error Messages and Test Cases
As much as possible, we always try to make error messages as informative as we can. If you're seeing an error message, check if it references a specific function, syntax error, or line of code that can be fixed before re-running the code.
Click here to learn more about the most common error messages you may run into when working on Karel assignments.
Students can also click the Check Code button to see where their program passes or does not pass the Autograder.
Using CodeHS Resources
Review the Video and Slides
Rewatch the lesson video, and go back over the lesson slides to review all of the examples code.
Review the Examples
Every CodeHS lesson includes an Example, which shows the lesson concept in a live code editor. This is a great opportunity to see code in action - students can review Example code at any time to compare to their own work.
Visit our Teacher Forum!
For help with specific student code issues, visit our teacher forum to talk with other computer science teachers, get help debugging code, and share tips and tricks for success! 😄
Still have questions? Contact our team at firstname.lastname@example.org to learn more!