Everything you need before the bell rings
Learning Objectives
Students will be able to…
- ✓Explain that a bug is a mistake in a program.
- ✓Find the bug in a short program.
- ✓Fix the bug so the program works.
- ✓Explain that debugging is a normal part of coding.
Your program doesn’t work — but the computer isn’t “wrong,” it did exactly what you said. So how do you find the one step that’s off?
Find the Bug
Project each buggy program and read it aloud. Have students find the one command that’s wrong — the tool explains how to fix it.
45 minutes, five moves
Tap any phase to open the teacher moves and student actions.
Warm-Up — It’s Not Working!
A program runs but does the wrong thing — whose “fault” is it?
👩🏫 Teacher Moves
- Show a program that misbehaves.
- Explain the computer did exactly what was written.
- Set the goal: debugging.
🎒 Student Actions
- Watch it go wrong.
- Realize the steps are off.
- Predict what “bug” means.
Learn — Bugs Are Normal
Teacher models debugging.
👩🏫 Teacher Moves
- Define bug and debug.
- Model reading a program step by step.
- Find and fix one bug aloud.
🎒 Student Actions
- Learn bug vs. debug.
- Follow the step-by-step check.
- See a fix.
Use It — Find the Bug
Students use the tool.
👩🏫 Teacher Moves
- Work through the buggy programs.
- Have students find the bug first.
- Explain the fix each time.
🎒 Student Actions
- Find each bug.
- Explain the fix.
- Check the reasoning.
Create — Debug a Program
Students create/fix.
👩🏫 Teacher Moves
- Give buggy programs (or grid robot).
- Have students find and fix the bug.
- Then break and swap with a partner.
🎒 Student Actions
- Fix a buggy program.
- Test the fix.
- Debug a partner’s.
Share — Share
Students share a fix.
👩🏫 Teacher Moves
- Invite a bug-and-fix story.
- Normalize mistakes as learning.
- Hand out the exit ticket.
🎒 Student Actions
- Share a bug and fix.
- Explain the check they used.
- Complete the exit ticket.
Built to the standards you report on
Aligned to the ISTE Standards for Students and the CSTA K-12 Computer Science Standards.
Debug (identify and fix) errors in an algorithm or program that includes sequences and simple loops.
Test and debug a program or algorithm to ensure it runs as intended.
Test solutions and troubleshoot to improve them.
Describe steps in a procedure using sequence language.
One lesson, every learner
Multilingual Learners
- Highlight the buggy step in color.
- Sentence frame: “The bug is ___. It should be ___.”
- Walk a buggy path to see the error.
Support & Access
- Give programs with one obvious bug.
- Offer two choices instead of three.
- Fix one step at a time and re-run.
Stretch & Extend
- Find and fix two bugs in one program.
- Explain why the computer isn’t “wrong.”
- Write a buggy program for a friend to fix.
What to gather
- 📽️Projector / board
- 📓Notebooks
- 💻Find the Bug
- 🔍Buggy-program cards
- ✏️Pencils
- 🎫Exit-ticket slips
Key terms — hover for a quick definition
Exit Ticket
Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students.
Going deeper? Bug swap.
Have students write a working program, add one bug on purpose, then trade and race to find each other’s bug. A printable bug-swap card is in the CS library.
Study the key terms
Tap a card to flip it, then rate whether you knew it. Built from this lesson’s vocabulary.
Nice work!
Check your understanding
A quick self-check with instant feedback, drawn from this lesson’s key terms.
Nice work!
Printable worksheet
A print-and-go review sheet with a built-in answer key. Tap “Show answer key” to reveal answers, or print the clean version for students.
Part A · Write the word that matches each meaning
- to correct a mistake
- to keep trying when it’s hard
- to run and check a program
- to follow a program step by step
- a sequence of commands
- a mistake in a program
- something that went wrong
- to find and fix a bug
Part B · Show what you learned
- What is a “bug” in coding?
- A program should go UP, UP but says UP, DOWN. What is the bug and the fix?
- Is it bad to have bugs in your code? Why or why not?
Part B: 1) A mistake in a program that makes it do the wrong thing. 2) The bug is DOWN; change it to UP so the program goes UP, UP. 3) No — all coders get bugs. Finding and fixing them (debugging) is a normal, important part of coding.