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:
- Debugging
- Bug
- Reading A Script
- Isolating An Error
- Testing Incrementally
- Trace A Script
- Predicting Output
- Expected Behavior
- Actual Behavior
- Error Diagnosis
- Logical Error
- Syntax Mismatch
- Test Case
- Code Review
Prerequisites
This chapter builds on concepts from:
- Chapter 1: Computational Thinking Foundations
- Chapter 3: Sequencing & Scripts
- Chapter 9: Custom Blocks & Abstraction
TODO: Generate Chapter Content