Skip to content

Debugging & Testing

Summary

This chapter builds the habit of reading, tracing, and predicting a script's behavior before comparing expected behavior to actual behavior, then isolating and diagnosing the resulting bug. Students practice testing incrementally, distinguishing logical errors from syntax mismatches, writing simple test cases, and reviewing code. It builds on the computational thinking foundations from Chapter 1, the scripting concepts from Chapter 3, and the custom block skills from Chapter 9, since debugging often means tracing through composed blocks. After completing this chapter, students will be able to systematically find and fix bugs in their own and others' Scratch scripts.

Concepts Covered

This chapter covers the following 14 concepts from the learning graph:

Concept Concept Impact Score
Debugging 8
Bug 5
Reading A Script 10
Isolating An Error 4
Testing Incrementally 2
Trace A Script 4
Predicting Output 3
Expected Behavior 1
Actual Behavior 1
Error Diagnosis 3
Logical Error 1
Syntax Mismatch 1
Test Case 1
Code Review 1

Prerequisites

This chapter builds on concepts from:


TODO: Generate Chapter Content