Home›Lesson Plans›Computer Science›Program Development · Grade 8

Debugging Strategies

Eighth graders learn to debug like a pro — with a systematic process instead of random guessing. Reproduce the bug, narrow down where it happens, form a hypothesis, change one thing, and verify. They order the process, then debug a broken program.

Grade 8Debugging Strategies50 minutes1 class periodCSTA / ISTEExplicit teaching4 StandardsCSTA
Start the Lesson
Assign or share this lesson

Copy link works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment.

Lesson at a Glance

Everything you need before the bell rings

Learning Objectives

Students will be able to…

  • ✓Follow a debugging process.
  • ✓Reproduce and isolate a bug.
  • ✓Change one thing at a time.
  • ✓Verify the fix.
Essential Question

How do you find and fix a bug systematically?

0
Lesson Phases
0
Vocabulary Terms
0
Standards Aligned
0
Interactive Task
Put in Order · Interactive

Order the Debugging Process

Project this and have students put the debugging steps in order.

🐛 Put the debugging steps in the right orderTry it
Tap the first debugging step!
The Lesson · Use → Modify → Create (a coding progression with Unplugged practice)

50 minutes, five moves

Tap any phase to open the teacher moves and student actions.

1

Hook — It Worked Yesterday!

6 min

What do you do when your program suddenly breaks?

👩‍🏫 Teacher Moves

  • Show a buggy program.
  • Ask how to start.
  • Set the goal.

🎒 Student Actions

  • Look.
  • Guess.
  • Get ready.
2

Use — Debugging Strategies

12 min

Students use the process.

👩‍🏫 Teacher Moves

  • Send students to Order the Debugging Process.
  • Order the steps.
  • Note change one thing at a time.

🎒 Student Actions

  • Order.
  • Say.
  • Note it.
3

Modify — Narrow It Down

13 min

Students modify.

👩‍🏫 Teacher Moves

  • Add a print to inspect a value.
  • Comment out a section.
  • Isolate the broken line.

🎒 Student Actions

  • Print.
  • Comment.
  • Isolate.
4

Create — Fix & Verify

13 min

Students create.

👩‍🏫 Teacher Moves

  • Fix a provided bug.
  • Test the fix.
  • Check nothing else broke.

🎒 Student Actions

  • Fix.
  • Test.
  • Check.
5

Reflect — Reflect

6 min

Students close.

👩‍🏫 Teacher Moves

  • Name the first step.
  • Say why change one thing.
  • Complete the exit ticket.

🎒 Student Actions

  • Name it.
  • Say.
  • Complete the exit ticket.
Standards Alignment

Built to the standards you report on

Aligned to the CSTA K-12 Computer Science Standards and the ISTE Standards for Students.

CSTA
2-AP-17

Systematically test and refine programs.

CSTA
2-AP-19

Document programs to make them easier to follow.

CSTA
2-CS-03

Systematically identify and fix problems.

ISTE
5 Computational Thinker

Test and refine solutions.

Differentiation

One lesson, every learner

Multilingual Learners

ELL / EMERGING READERS
  • Debug-step cards.
  • Frame: “what, where, why, fix, check.”
  • Think-aloud a fix.

Support & Access

IEP / 504
  • Use 3 steps.
  • Fix one simple bug.
  • Use a checklist.

Stretch & Extend

GIFTED / EARLY FINISHERS
  • Use a debugger’s breakpoints.
  • Write a bug report.
  • Add tests to prevent regressions.
Materials

What to gather

  • 📽️Screen / board
  • 🐛Debug-step cards
  • 💻Order the Debugging Process
  • 🐍A buggy program
  • 📓Notebooks
  • 🎫Exit-ticket slips
Vocabulary

Key terms — hover for a quick definition

bugan error that makes a program misbehavedebugto find and fix bugsreproduceto make the bug happen againisolateto narrow down where it occurshypothesisa guess about the causetestto check if a change workedverifyto confirm it is truly fixedregressiona fix that breaks something else
Evaluate

Exit Ticket

Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students.

QUESTION 1
What is the first debugging step?
Reproduce the bug (make it happen again).
QUESTION 2
Why change one thing at a time?
So you know exactly what fixed it.
QUESTION 3
What is the last step?
Verify the fix and that nothing else broke.

Reflect: debugging strategies.

Have students list the debugging steps in order. A printable debugging worksheet is in the Computer Science library.

Study · Flashcards

Study the key terms

Tap a card to flip it, then rate whether you knew it. Built from this lesson’s vocabulary.

🃏 CS Debugging Strategies (Grade 8)Flip
Card 1
Term
Tap to flip →
Meaning
0

Nice work!

Practice · Quiz

Check your understanding

A quick self-check with instant feedback, drawn from this lesson’s key terms.

📝 CS Debugging Strategies (Grade 8)Quiz
Score: 0
1 / 6
Question 1
0%

Nice work!

Practice · Worksheet

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.

🖨️ CS Debugging Strategies (Grade 8)Print
Name: ________________________
Date: ____________

Part A · Write the word that matches each meaning

Word bank: bug, debug, hypothesis, isolate, regression, reproduce, test, verify
  1. an error that makes a program misbehave
  2. to make the bug happen again
  3. a fix that breaks something else
  4. to find and fix bugs
  5. to confirm it is truly fixed
  6. a guess about the cause
  7. to check if a change worked
  8. to narrow down where it occurs

Part B · Show what you learned

  1. What is the first debugging step?
  2. Why change one thing at a time?
  3. What is the last step?
Answer key — Part A: 1) bug · 2) reproduce · 3) regression · 4) debug · 5) verify · 6) hypothesis · 7) test · 8) isolate
Part B: 1) Reproduce the bug (make it happen again). 2) So you know exactly what fixed it. 3) Verify the fix and that nothing else broke.