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:

  1. Debugging
  2. Bug
  3. Reading A Script
  4. Isolating An Error
  5. Testing Incrementally
  6. Trace A Script
  7. Predicting Output
  8. Expected Behavior
  9. Actual Behavior
  10. Error Diagnosis
  11. Logical Error
  12. Syntax Mismatch
  13. Test Case
  14. Code Review

Prerequisites

This chapter builds on concepts from:


TODO: Generate Chapter Content