Browse topics

Curriculum

Explore all 1,858 open curriculum concepts.

Advanced filters 2

Computing Algorithms & Programming Ages 6–13

Testing and debugging programs

Test visual programs by predicting what should happen, running them, finding where the behaviour differs (bugs) and fixing them one change at a time

Teach
Share

Activity

Testing and debugging programs means predict what should happen, run it, find where behaviour differs (a bug), and fix one change at a time. We will run a paper arrow program, spot a bug, fix one step, then check a fresh short program.

Materials

  • Paper “program” of 4 arrow steps for a toy/robot walk across the table
  • A small toy as the runner
  • Optional later: adult-previewed CS Unplugged companion

Steps

  1. Write 4 arrow steps to move a toy to a cup. Child predicts the path.
  2. Run exactly. Notice a wrong turn (bug).
  3. Fix only one step. Re-run and compare to the prediction.
  4. Fresh 3-step program. Predict → run → fix one bug if needed. Record and stop after this check.

Done

On a fresh short program, child predicts, runs, and either confirms or fixes one step. Success means predict + one-at-a-time fix habit. Note support. This samples debugging, not every programming language.

Example. If arrows say right when they should say left, the toy misses the cup. Change one arrow, then test again.

3 before 2 after

Loading map…
List nearby topics

Ways to teach

Pick a way to teach this topic. Come back here afterward to record progress.

Gakuva

Testing and debugging programs means predict what should happen, run it, find where behaviour differs (a bug), and fix one change at a time. We will run a paper arrow program, spot a bug, fix one step, then check a fresh short program.

Teach

CS Unplugged

Computer Sciencewithout a computer

Open (new tab)
About this link

Free computing activity hub useful for Testing and debugging programs. An adult picks one activity; not a single graded exam.

CS Unplugged. “Computer Sciencewithout a computer.” External page; Gakuva does not copy, host, embed, or redistribute materials.

Unknown — link only

Check understanding and curriculum record

Family records and proof options

Keep a record of your learning

Save photos, notes, and attendance. Export a proof packet for compliance or portfolio reviews.

Check understanding

“When your child's coding project doesn't work the way they wanted, do they test it, hunt for the 'bug' and fix it step by step rather than starting over?”
Full curriculum checks
  • Predict what a short program should do for given inputs, including unusual ones (e.g. a wrong or blank answer), run it and record whether each result matched
  • Find and fix a bug in a given program (e.g. a character that turns the wrong way or a loop that repeats too many times)
  • Explain how they tracked down the bug (e.g. running one part at a time, checking each block against the algorithm)
Curriculum record
Type
Procedural
Subject
Computing
Domain
Algorithms & Programming
Age range
Ages 6–13

Standards

acara-v9:AC9TDI4P04acara-v9:AC9TDI6P05the-ontario-curriculum-mathematics-2020:ON-MATH-2020-G1-C3.2the-ontario-curriculum-mathematics-2020:ON-MATH-2020-G2-C3.2the-ontario-curriculum-mathematics-2020:ON-MATH-2020-G3-C3.2the-ontario-curriculum-mathematics-2020:ON-MATH-2020-G4-C3.2the-ontario-curriculum-mathematics-2020:ON-MATH-2020-G5-C3.2the-ontario-curriculum-mathematics-2020:ON-MATH-2020-G6-C3.2the-ontario-curriculum-mathematics-2020:ON-MATH-2020-G7-C3.2the-ontario-curriculum-science-and-technology-20:ON-SCI-2022-G3-A2.1