Lesson 7.1: Bug Busters - Debugging Workshop

Welcome, Bug Busters! Every programmer, from beginner to expert, runs into “bugs”—unexpected problems in their code. Today, you’ll learn that bugs aren’t scary; they’re just puzzles waiting to be solved. Let’s learn the secret strategies to squash any bug!

What You’ll Learn

By the end of your training, you’ll be able to:

  • Calmly identify when your program has a bug.
  • Use a four-step secret strategy to find and fix bugs.
  • Not give up when you face a tricky programming problem.
  • Help your friends find and fix bugs in their code, too!

Your Bug Busting Mission

What’s a “Bug”? (12 minutes)

  • Let’s learn the funny true story of the first-ever computer “bug” (it was a real moth!).
  • We’ll talk about how finding bugs is a normal, everyday part of being a programmer.
  • Most importantly, we’ll learn a programmer’s most important belief: Bugs are learning opportunities, not failures!

Secret Strategy Training (18 minutes)

  • It’s time to learn the secret four-step bug-squashing method: Stop, Look, Think, Try.
  • We’ll practice this method together on some programs that have obvious bugs.
  • You’ll learn how to read code one step at a time, just like a detective looking for clues.

The Bug Hunt Challenge (15 minutes)

  • Now it’s your turn! We have some pre-made programs that are full of sneaky bugs.
  • Your mission is to use the four-step strategy to find and fix different kinds of bugs (like blocks in the wrong order or missing pieces).
  • Let’s celebrate every bug we squash!

Be a Bug Buddy! (5 minutes)

  • Now, let’s practice helping our friends.
  • You’ll get to look at a classmate’s project and help them find a bug.
  • Remember the Bug Buster rule: give helpful clues, don’t just fix it for them!

Your Bug Busting Toolkit

  • A collection of Scratch Jr. programs with sneaky bugs hidden inside
  • A poster of our secret Stop, Look, Think, Try strategy
  • A “bug log” worksheet to keep track of the bugs you find and how you fixed them

How to Become a Master Bug Buster

  • We’ll see you using the four-step strategy when you get stuck.
  • Persistence Power: Do you keep trying even when a bug is tricky? That’s the mark of a real programmer!
  • How good are you at giving helpful clues to your Bug Buddy?

The Secret Strategy:

  • 1. Stop: Take a breath! Don’t just click everywhere.
  • 2. Look: Read your code carefully, one block at a time.
  • 3. Think: What did you EXPECT to happen? What is ACTUALLY happening?
  • 4. Try: Make ONE small change and test it again.

New Tech Words to Master

  • Bug: An error in a program that stops it from working the way you want.
  • Debugging: The process of finding and fixing bugs. It’s like being a detective for your code!
  • Systematic: Having a step-by-step plan to solve a problem.
  • Persistence: Not giving up, even when something is hard. It’s a programmer’s superpower!