Skip to content
Home: Success TutoringTeachers

Computer Science glossary · Kindergarten to Grade 9

Debugging

What it means

Debugging means finding and fixing mistakes, called bugs, in an algorithm or program. You test it, find where it goes wrong, fix that step, and test again.

Examples

  • A robot turns left instead of right, so you find the wrong turn instruction and change it.
  • Tracing a maze algorithm with your finger to find the step where it walks into a wall.
  • Adding a "say score" block to check what a variable holds while the game runs.

For teachers

Debugging is a systematic process: run the program, compare what happened with what was expected, narrow down where the difference starts, make one change and retest. Encourage students to trace through the steps one at a time (by hand, with a finger, or by acting it out) rather than rewriting everything. Framing bugs as normal and expected builds persistence; experienced programmers spend much of their time debugging.

Common misconception

Students often see a bug as a sign they have failed and want to start again from scratch. Bugs are a normal part of programming; the skill is to find exactly which step is wrong and fix only that, then test again.

Lesson plans that teach it

Browse the full glossary