Day 1Day 2Day 3Day 4Day 5

Session 27: Debugging

25 minutes

discussion-based

Purpose

Debugging is a critical skill for a programmer. This session gives critical time to develop teachers debugging skills as well as discuss how they will support students with debugging.

Objectives

  • Experience a hands on debugging activity
  • Discuss debugging techniques and know what resources exist in the course to support students and teachers in debugging

Supplies & Prep

Room Setup:

  • Normal Breakout Room Set Up
  • Teachers in pairs

Facilitator Supplies and Prep:

Teacher Materials:

Agenda

Example Debugging Task (7 minutes)

Debugging Strategies (18 minutes)

Facilitation Guide

Example Debugging Task (7 minutes)

(7 minutes) Debugging Level

Remarks

The problems you had when your HTML code did not work correctly are bugs. The process of fixing bugs and strategies used to fix them is called debugging. Today we're going to be try doing some debugging of other people's code. Debugging is the focus of the next lesson after the one we just saw.

Pair teachers up with a partner.

Have teachers visit Code Studio, Unit 2, Lesson 8 Level 2 and work with their partner to try to complete the task. If teachers complete the level quickly, they can move on to the next level, but plan to stop once everyone has completed U2 L08 Level 2.

Debugging Strategies (18 minutes)

(7 minutes) Approach to Debugging

(2 min) Think for a moment about how you have approached debugging this week, and in the activity we just did.

Reflection Prompt: What types of bugs did you find and strategies did you employ?

(5 min) Now, go and look at the Debugging Investigation Guide (found in Appendix C of the curriculum guide), which outlines four steps to debugging:

  1. describe the bug;
  2. hunt for the cause;
  3. try fixing it;
  4. document your bug

Discussion Prompt: How does this process fit with the approach you took? Discuss with the partner you worked with in the debugging activity above.

(11 minutes) Discuss: Supporting Student Debugging

Prompt: How can we help students become successful at debugging? How can you apply the four steps of the debugging investigation guide to help students learn to tackle these sorts of problems?

Remarks

Debugging and supporting student debugging is something we will continue to practice during the week and through out the year. As we continue through out the week I encourage you to keep adding debugging strategies to your list as we find new ways of the tackling the challenges we face in our code.