Skip Navigation

Speaking Code: Debugging
Lesson 6 (of 7)

By Jen Perry 120 minutes
Level
Grades 4-6
Subjects
English Language Arts,
Science and Technology,
Mathematics
components
  • Programming
  • Data
Tools & Languages
Block-based,
Unplugged

Key Coding Concepts

  • Debugging

Terminology

Debugging

Finding problems in code and solving them

This is the sixth of seven lessons.

Learners will focus on learning the coding concept of ‘debugging’. This lesson includes a computer activity and an unplugged activity. Educators can do both activities or choose one of the activities.

Prerequisites

The educator should have some knowledge of coding concepts and experience with Scratch and Blockly. Completing the individual activities ahead of time would be helpful as you may have to model how to complete activities. There is an option to see the solution for each activity.

Introduction

Ask: What is debugging?

Play code.org's 'Maze Debugging' video.

Say: A programmer must have a growth mindset! Errors in sequence/algorithm happen all the time and coders need to use logical thinking skills to figure out what went wrong.

Plugged-in Activity

45 minutes

Complete this activity.

Unplugged Activity

60 minutes

Check out this code.org relay activity to test your debugging skills.

Supporting videos:
bit.ly/codeDOTorg-relay-programming
bit.ly/relay-programming-teacher-video

Online activities include a multiple choice and matching assessment that learners must answer before completing the activity level.

Make anecdotal notes of learners who are struggling to complete tasks. Also, make notes of learners who are completing tasks quickly and/or supporting their peers.

Unplugged: Debugging Assessment (code.org)

Coding

English

  • Complete the journaling included in ‘Relay Programming’ activity. Journal Prompts:
    • What was today's lesson about?
    • How did you feel during today's lesson?
    • How did teamwork play a role in the success of writing today's program?
    • Did you start to get frustrated at any point? What did you do about it?
  • For this lesson series, learners could use a digital or regular journal to include the coding vocabulary taught.

Math

  • Based on current math concepts being taught in class, give learners a math problem that has the wrong answer and then have them ‘debug’ and determine what the errors are.

Data (Assessing Information)

  • Is data always accurate? Find real world examples of data that contradict each other. Discuss whether being able to find errors in data and debug is an important skill.
  • This is complicated information from Google, but it does demonstrate to learners that programmers need to look at their data sets and look for errors & debug if necessary.

Teach lessons that are tied to your existing curriculum! https://bit.ly/CLClessons

r

More Lesson Plans For Grades 4-6

    View All Lesson Plans

    Explore lessons based on components

    The K-12 Computer Science Framework

    Although learning how to build digital projects is a key part of Computer Science education, students should also learn a wider set of skills and competencies that will help them to harness the power of digital technologies as both creators and consumers. A comprehensive approach to K-12 Computer Science education includes learning about the following five focus areas:

    View Framework ➝

    Programming

    By the end of high school, students should be able to create a simple computer program.

    Computing and Networks

    By the end of high school, students should understand and be able to use the tools and devices commonly used to build digital projects.

    Data

    By the end of high school, students should be able to explain how we use computers to create, store, organize, and analyze data.

    Technology and Society

    By the end of high school, students should be able to explore the ways in which technology and society have mutually shaped each other.

    Design

    By the end of high school, students should be able to apply design principles to the digital projects they create.