Teaching Kids to Debug with a Dry Erase Coding Grid
Every programmer spends a lot of time fixing mistakes. Debugging is a skill students can practice long before they touch a computer, and a reusable grid makes every error visible.
This is the third post in our unplugged coding series. New here? Start with Teach Coding Without Computers, then Pixel Art Coding.
Setup
Use a 100 Count Graphboard with columns A–J and rows 1–10 labeled, starting at A1. Review the five commands: U, D, L and R move one cell, and F fills the current cell.
Find the bug
Start with a program students know. This one draws a capital T:
F R F R F L D F D F
Now show them a broken version:
F R F R F L D F R D F
Students must run the broken program exactly as written before trying to fix it. The extra R shifts the last filled cell from B3 to C3, so the T's stem comes out crooked.
A debugging routine students can repeat
- Predict what the program should draw.
- Run it exactly as written.
- Compare the result with the expected picture.
- Find the first command that went wrong.
- Fix one thing: change that command or remove the extra one.
- Retest the whole program on a cleared grid.
The last step matters. A fix isn't done until the entire program has been run again from A1.
Partner game: plant a bug
Each student writes a working program and tests it. Then they secretly change one command to break it. Their partner gets the target picture and the broken program, finds the error and explains the smallest fix that would correct it.
Differentiate
- Getting started: highlight the line of the program where the bug is hiding.
- Ready for more: plant two bugs instead of one.
- Use the whole board: trace a longer route out to H8, where one wrong move makes a bigger, easier-to-spot difference.
What to assess
For an exit ticket, ask: How did you check that your fix actually worked? Look for students who reran the whole program, not just the line they changed.
