Skip to content
  1. Home
  2. Games
  3. Coding Games for Kids
  4. Bug Hunter

Bug Hunter · Coding game for kids

Bug Hunter

Press Run or Step to see what the program prints and compare it with the expected output. Then tap the line with the bug and pick the correct fix.

Ages 10+20 levels🔊 Sound🗣️ Voice
👶 Ages 10+ 🏁 20 levels 🔊 Sound effects 🗣️ Read aloud 📱 Works on tablets 🆓 Free, no sign-up

Free debugging game for kids ages 10–13: run short JavaScript-style programs, step through them with a variable watch table, find the buggy line and fix it.

How to play Bug Hunter

Each level gives your child three short programs. Every program has a clear goal (“print the sum of the numbers from 1 to 9”) and the output it should produce. Somewhere in the code a bug is hiding.

  1. Run it. Press Run to watch the program execute line by line, or Step to move one line at a time. The output panel shows what the program prints.
  2. Compare. Does the output match the expected output? If not, something is wrong.
  3. Trace. The watch table shows every variable after each step. Changed values light up, so it is easy to see when a total jumps the wrong way or a loop stops one round early.
  4. Tap the buggy line. A correct line just says “this line is fine.” The buggy line opens a short list of possible fixes.
  5. Pick the fix. Wrong options show what they would print, which teaches as much as the right answer. The correct fix is applied, the program runs again and the output turns green.
Levels Programs Typical bugs
1–4 Variables and arithmetic Wrong operator, missing brackets, a value calculated but never stored
5–8 Loops Off-by-one (< vs <=), a counter that never changes, a loop that never ends
9–12 Loops with if Wrong remainder test, > instead of >=, "i" in quotes instead of the variable
13–16 Lists and text Reading past the end of a list, position vs value (i vs nums[i])
17–20 Two bugs per program Fix one, run again, and hunt down the second

Numbers, words and lists are randomized, so programs change on every replay.

What your child learns

Reading code carefully. Writing code is only half of programming. Reading it, line by line, and knowing exactly what each line does is the other half. Bug Hunter makes that the whole game.

Tracing and prediction. Stepping through a loop while watching i and sum change is the best way to understand how loops work. Many children “know” loops but are surprised to see that i < 5 stops at 4. Watching it happen fixes the idea for good.

Classic bugs. The game focuses on mistakes programmers make every day: off-by-one errors, using a position instead of the value stored there, forgetting to store a result, mixing up + and *, or confusing a text string with a variable. Recognizing these patterns makes your child’s own code more reliable.

Scientific thinking. Debugging is a small experiment: form a hypothesis (“the loop stops too early”), test it with Step, and confirm it with the output. Wrong fixes show their result, so every guess produces evidence.

Calm persistence. Finding a bug can take a few tries. Because mistakes only cost stars, not the level, children learn to slow down and check rather than guess wildly.

Tips for parents

  1. Ask for a prediction. Before pressing Run, ask “What do you think this prints?” Then compare.
  2. Use Step on loops. Encourage your child to step through at least one loop per level and say the value of the counter out loud.
  3. Talk about the wrong fixes. When an option shows what it would print, ask why. Explaining a wrong answer is powerful learning.
  4. Celebrate the tricky ones. The two-bug levels are hard. Finishing them with any number of stars is an achievement.

Offline activities and variations

  • Recipe bugs. Write a simple recipe or set of directions with one deliberate mistake and ask your child to find it.
  • Paper trace tables. Take a short loop like “start at 1, double it 5 times” and fill in a table by hand: step, value. It is exactly what the watch table does.
  • Swap roles. Let your child write a tiny program with a bug for you to find. Creating good bugs requires understanding the code deeply.

Common mistakes

  • Tapping lines before running the program. The output is the clue, so always run first.
  • Assuming the bug is on the line where the output is printed. Often the problem starts earlier.
  • Forgetting that list positions start at 0.

Frequently asked questions

Does my child need coding experience to play Bug Hunter?
A little helps. The first levels use only variables and arithmetic, such as `let total = apples * price;`, and every program states its goal in plain English. Kids who have played Code Quest will feel at home.
Why teach debugging instead of just writing code?
Professional programmers spend a large share of their time reading code and finding mistakes. Debugging trains careful reading, prediction and patience, and those habits make children better at writing their own programs too.
What is the watch table?
It lists every variable and its current value. When your child presses Step, one line runs at a time and any value that changed is highlighted, so they can see exactly when a loop counter or a total goes wrong.
Is the code real JavaScript?
It is a safe subset of JavaScript run by the game's own small interpreter. The syntax for variables, loops, if statements, lists and text matches real JavaScript, so the knowledge transfers directly.
How are the stars calculated?
Each level has three programs. Stars depend on wrong guesses (tapping a correct line or choosing a wrong fix). One slip or fewer earns three stars, and finishing always earns at least one.

More games like Bug Hunter

All coding games for kids →