Expected result
State what should happen before changing code.
Curriculum topic
Debugging is the disciplined work of explaining the difference between what a system should do and what it actually does.
Why it matters
Every substantial project contains surprises. Debugging teaches students to slow down, preserve evidence, test one idea at a time, and treat a bug as a clue rather than a judgment about ability.
Real-world connection
Repairing a bicycle, tracing a circuit, and debugging a game all depend on separating symptoms from causes. Random changes can hide information; a controlled test creates it.
The connection shows where the idea returns; it does not claim every advanced application is taught in this first topic.
Math and logic kernel
State what should happen before changing code.
Describe what actually happened without guessing why.
Choose one possible cause.
Change or inspect one relevant thing.
Small examples
Inspect position when movement seems wrong.
Reveal whether the game thinks it is playing or finished.
Test one sprite, sensor, or rule alone.
Find a repeatable sequence that causes the problem.
Program connections
Beginner-friendly programming through original games, animations, simulations, and interactive stories.
Commands, sensors, simple electronics, simulations, and physical systems organized around Sense, Decide, Act.
A future bridge from visual programming to Lua, 3D objects, events, and larger game systems.
A future practical and critical program about patterns, predictions, prompts, limits, and human judgment.
Common mistakes
The project works again but nobody knows which change mattered.
The easiest path works while boundaries remain broken.
A precise program rule is overlooked because the result feels unreasonable.
Extra code covers the visible problem while the underlying state remains wrong.
Lesson and projects
Build a fast chase game with known positions, collision rules, win and loss states, and reliable restart behaviour.
Open projectPlan, predict, and debug a robot route using paper, a grid simulation, or optional hardware.
Open projectMeasure reaction time, store results, and decide what makes a timing test fair.
Open project