When building out a project, you will no doubt make mistakes. Maybe you can’t figure out how to get a particular feature to work, like a sequence of lights or a tricky point system. Maybe your code was doing what you wanted it to do one minute but not the next. Errors, or bugs, are an essential part of coding– no matter what level you are at. Debugging is the process of finding and working through these bugs.

What is debugging?

Debugging can be a frustrating process, especially for young coders. Make sure to emphasize debugging during class time: show students the bugs in your programs and encourage students to collaborate and support each other through the debugging process. Much of the learning process comes through trying new things and making mistakes!

Debugging Tools

Here are a few tips and tricks to support the debugging process in your classroom:

The Splat on the left-hand side of the coding screen work just like real Splats. Encourage students to use them throughout the process of building their code.

Disabling Blocks

You can disable blocks of code by pressing and holding the top block and selecting “Disable Block” from the dropdown menu. This can be helpful when testing out multiple ways to do something in a program or to try to isolate where a bug may be hiding.

*The “Duplicate” and “Collapse Block” option from this menu is also very helpful!

Debugging Exercises

Create bugs in programs and have your students work through them. Splats Goalie from our Core Activity Pack is a debugging exercise, but you can modify any activity to work the same way.