Debugging Your Project
Debugging means finding and fixing errors in your code. Every programmer debugs — it’s a skill, not a failure.
Common Scratch Bugs and Fixes
- Sprite doesn’t move: Check you have a “When 🏁 clicked” hat block and clicked the flag.
- Score doesn’t reset: Add “set Score to 0” at the start of your green flag script.
- Collision not working: Check the sprite names match exactly in the “touching (sprite)?” block.
- Clones piling up: Make sure every clone script ends with “delete this clone”.
- Broadcast not received: Check the message name is spelled identically in both broadcast and receive blocks.
Debugging Strategy
Click individual blocks to run them one at a time and see what each one does. Add “say” blocks temporarily to display variable values — they’re your best debugging tool.