Everything you need before the bell rings
Learning Objectives
Students will be able to…
- ✓Reproduce a bug.
- ✓Locate the cause.
- ✓Fix and test.
- ✓Order the steps.
Debugging is a skill, not luck. What are the orderly steps that take you from “it doesn’t work” to a fix you can trust?
Order the Steps
Project this and put the debugging steps in order — tap each step from reproducing the bug to testing the fix.
55 minutes, five moves
Tap any phase to open the teacher moves and student actions.
Hook — It Doesn't Work!
Your program runs but gives the wrong answer. Guessing wastes time. What is a smart, orderly way to track down the bug?
👩🏫 Teacher Moves
- Show a buggy result.
- Ask how to find it.
- Set the goal.
🎒 Student Actions
- Think.
- Share.
- Get ready.
Use — Order the Steps
Students put the debugging steps in order.
👩🏫 Teacher Moves
- Send students to Order the Steps.
- Order the steps.
- Name each one.
🎒 Student Actions
- Order.
- Say.
- Note it.
Modify — Find the Bug
Students debug a small program.
👩🏫 Teacher Moves
- Read a short buggy program.
- Locate the error.
- Explain the cause.
🎒 Student Actions
- Read.
- Locate.
- Explain.
Create — Debug Log
Students build a debugging log.
👩🏫 Teacher Moves
- Describe a bug.
- Record each step you take.
- Note the fix and test.
🎒 Student Actions
- Describe.
- Record.
- Note.
Reflect — Fix It, Then Prove It
Students reflect on testing the fix.
👩🏫 Teacher Moves
- Why reproduce a bug first?
- Why test after fixing?
- Complete the exit ticket.
🎒 Student Actions
- Say it.
- Say it.
- Complete the exit ticket.
Built to the standards you report on
Aligned to the CSTA K-12 Computer Science Standards and the ISTE Standards for Students.
Systematically test and refine programs.
Use a process to find and correct errors.
Document a program to make debugging easier.
Troubleshoot problems methodically.
One lesson, every learner
Multilingual Learners
- Step cards with icons.
- Sentence frame: “First I ___ , then I ___ .”
- Order two steps at a time.
Support & Access
- Start with 'reproduce the bug'.
- Debug one example together.
- Add one step at a time.
Stretch & Extend
- Apply the process to a real bug.
- Add print statements to locate it.
- Write a test that catches the bug.
What to gather
- 📽️Projector / board
- 🖼️Debug-step cards
- 💻Order the Steps
- 🐛Sample buggy programs
- ✏️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.
Create: a debug log.
Have students describe a bug, record each step they take to track it down, and note the fix and the test that proves it, building a habit of orderly debugging. A printable debugging worksheet is in the Computer Science 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 follow code step by step to find an error
- the real reason a bug happens
- a new bug caused by a change
- a spot where you pause code to inspect it
- to make a bug happen again on purpose
- an input used to check a program's behavior
- an error that makes a program behave wrongly
- the process of finding and fixing bugs
Part B · Show what you learned
- What is the first step in debugging?
- Why fix the root cause instead of the symptom?
- Why test after fixing a bug?
Part B: 1) Reproduce the bug, so you can see it happen reliably and know when you have fixed it. 2) Fixing only the symptom leaves the real problem in place, so the bug (or a similar one) comes back. 3) To prove the fix actually works and that your change did not break something else.