"Walk three steps, turn left, open the box." Your child follows the instructions and ends up facing the wall. Somewhere, one step is wrong. Finding it is called debugging, a word programmers use for tracking down the "bug" that makes a program misbehave.
Debugging is one of the most useful thinking skills a child can practise. It means comparing what should happen with what actually happens, checking one step at a time and fixing the cause rather than starting over. And it can be a lot of fun.
What debugging means for children
Explain it simply: "A bug is a mistake in the instructions. Debugging is finding where it is and fixing it."
Make it clear that bugs are completely normal. Everyone who writes instructions, from a child drawing a treasure map to an adult writing a computer program, makes them. The skill isn't avoiding mistakes; it's finding them calmly.
Game 1: directions with a bug
Give your child spoken directions to a hidden toy, with one deliberate mistake.
- Hide a small toy somewhere in the room.
- Give directions, such as: "Stand by the door. Take four steps forward. Turn right. Look under the cushion."
- Make one step wrong, for example "turn right" when it should be "turn left".
- When your child doesn't find the toy, ask: "Which step do you think was wrong?"
Let them go back to the start and try the steps again, slowly, watching where things stop making sense. Once they've found the bug, they fix it and find the toy.
Game 2: routines in the wrong order
Familiar routines are perfect for spotting bugs, because children know what should happen:
- "Put on your shoes, then put on your socks."
- "Brush your teeth, then put the toothpaste on the brush."
- "Eat your cereal, then pour the milk."
Read the steps aloud and let your child spot the problem. Then ask them to fix it and explain why the new order works. Silly bugs make children laugh, and laughter keeps them engaged.
Game 3: arrows on a grid
Draw a small grid of squares (4 by 4 is enough) with a start square and a star.
- Write a path with arrows: right, right, down, right, down.
- Put one wrong arrow in the path.
- Your child follows the arrows with a finger or a small toy and finds where it goes off course.
Older children can then write their own arrow paths for you, with or without a hidden bug. Can you find it?
A step-by-step method for finding bugs
Teach your child a simple method they can use for any bug:
| Step | What to ask |
|---|---|
| 1. What should happen? | "Where should we end up?" |
| 2. What actually happened? | "Where did we end up?" |
| 3. Go step by step | "After this step, is everything still right?" |
| 4. Find the first wrong step | "This is where it went wrong." |
| 5. Fix one thing and test again | "Does it work now?" |
The key idea is finding the first step where things go wrong, instead of guessing or changing everything at once. Changing one thing and testing again tells you whether the fix worked.
Bugs, not failures
Debugging changes the way children feel about mistakes. When something doesn't work, the question becomes "where's the bug?" rather than "I'm bad at this".
- Use the word "bug" lightly and playfully: "Ooh, there's a bug somewhere. Let's find it!"
- Praise the hunt, not just the fix: "You checked every step carefully."
- Share your own bugs: "I wrote the shopping list in the wrong order, so I walked round the shop twice."
In Dologi, "Unjam the gears" puzzles show a set of gears that can't turn, and children find which gear to take away so the rest can spin again: a small debugging job, solved by working out where the problem really is.
In short
- Debugging means finding the step that makes instructions go wrong, and fixing it.
- Play "find the mistake" with directions, routines and arrow paths.
- Teach a method: compare what should happen with what did, go step by step, find the first wrong step, fix one thing and test.
- Treat mistakes as bugs to find, which keeps children calm and curious.
Read more: Loops and conditions for children: learning through skipping and songs
