Debugging a visual program
Finding the block that causes a wrong result in a program and fixing it, such as a block in the wrong order or a wrong condition.
Understanding Debugging a visual program in Years 5–6 Creating Digital Solutions
What it does: The blocks are stacked in the wrong order. Debugging means finding this and swapping the blocks so move comes first. Blocks run from top to bottom. Swap the two say blocks so 'Hello' is on top. Running one script at a time helps you find the exact script that has the bug. Showing the variable lets you see its value change (or not change) as the program runs. The condition checks the wrong number. Change score = 1 to score = 10. A wrong condition or event block can stop a script from running when you expect. Always test again. This checks that the fix worked and nothing else broke.
Common mistakes: Changing the score by 0 means it never goes up, so the sprite says 0. Showing the score variable helps you spot this. It should be change score by 1. The blocks are in the wrong order. The sprite is hidden before it speaks, so you cannot see it say anything. Line 2 should be show.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 61–74) and word search (Modules 41–74).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
debuggingFill in the Blanks
Spot the Error
Student with a class code? Join your class →