Debugging

Debugging & Error Resolution

1
2
3
4
5
6

Master systematic techniques to find, isolate, and fix logic, syntax, and runtime errors in programs.

Level 1

Spotting Errors

Identify and fix simple errors in physical sequences and robot paths.

Learning objective

Identify when a simple sequence fails and fix the incorrect instruction.

Let's Go!

Learn

Compare a broken sequence where a sprite turns the wrong way with a corrected sequence.

Curriculum Level:Level 1
๐Ÿ’ป
Level 1: Minimize, Maximize & Close

Practice using the window control buttons in the top right corner of the window.

๐Ÿ–ฅ๏ธ Virtual Desktops:
Snap Layout:
๐ŸŒ‹Volcano Expedition - Web Browser

Volcanoes: Earth's Fiery Chimneys!

Melted subterranean rock called magma rises through vents. When it erupts onto the surface, it becomes glowing red lava!

๐ŸŒ‹๐Ÿ”ฅ
๐Ÿ“Field Notes - Notepad

My Study Notes

10:45 AM

Try it yourself

Spot the Bug

๐ŸŒŸ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)โ–พ

๐ŸŽฏ Task Success Criteria (Rubric)

Foundation

Notices when a physical robot or sprite stops at the wrong location.

Developing

Identifies which single step in a 3-step sequence caused the mistake.

Secure (Goal)

Corrects the erroneous step to ensure the sequence finishes successfully.

Mastery

Explains why the original step caused an error and demonstrates the fix.

๐Ÿ‘€ What A Good One Looks Like (WAGOLL)

Exemplar Standard

A top-tier student project for Spotting Errors includes:

  • Core Deliverable: Spot the Bug
  • Target Quality: Corrects the erroneous step to ensure the sequence finishes successfully.
  • Excellence & Polish: Explains why the original step caused an error and demonstrates the fix.
๐Ÿ“
Save to Your Website Portfolio:

When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!

โญSelf-Assessment: How confident do you feel with this skill?

Reflect

How did changing one arrow fix the whole robot path?

Low
High

Learning check

Learning Check

A robot was supposed to move forward twice and turn right, but turned left instead. What should you change?

Select the correct fix for the sequence error.

Answer correctly to unlock the next level.

Spot on! Swapping the direction fixes the turn error.Not quite. Check which direction the robot needed to turn.
Teacher setup, curriculum links and progress descriptors

Spark support

Routine: See Think Wonder

Achievement pathway

  • Foundation: Notices when a physical robot or sprite stops at the wrong location.
  • Developing: Identifies which single step in a 3-step sequence caused the mistake.
  • Secure: Corrects the erroneous step to ensure the sequence finishes successfully.
  • Mastering: Explains why the original step caused an error and demonstrates the fix.

Curriculum links

Curriculum strand: algorithms-programming

Outcome: AP.01.B.1.1 โ€” Identify and fix simple errors in physical sequences and robot paths.

PYP: Form ยท Digital instructions must be precise for systems to work as expected.

Learner profile: Inquirer

Competency tags

  • debugging
  • error-finding
  • logic

Gate support

Accessibility alternative:

Teacher override: allow

Back to top

Locked level

Level 2: Step Tracing

Complete the previous learning check to unlock this next level.

Level 2

Step Tracing

Predict program behavior by tracing execution step-by-step.

Learning objective

Trace code line-by-line or block-by-block to predict where a bug occurs.

Let's Go!

Learn

Use a step-execution tool to run code one block at a time.

Curriculum Level:Level 1
๐Ÿฅท
Level 1: Copy & Paste Ninja Power

Highlight text in the Source Box, press Ctrl+C (Cmd+C) to copy, then click Destination and press Ctrl+V to paste.

Target Shortcut:Ctrl + C
โœจ Mission Ready
๐Ÿ“ Source Document
โž”
๐Ÿ“‹ Destination Notepad

Try it yourself

Trace the Code

๐ŸŒŸ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)โ–พ

๐ŸŽฏ Task Success Criteria (Rubric)

Foundation

Follows along as code blocks highlight during execution.

Developing

Predicts where a character will land after each individual block runs.

Secure (Goal)

Traces a 5-block script manually and highlights the exact block containing the bug.

Mastery

Teaches a partner how to step through code block-by-block to find hidden bugs.

๐Ÿ‘€ What A Good One Looks Like (WAGOLL)

Exemplar Standard

A top-tier student project for Step Tracing includes:

  • Core Deliverable: Trace the Code
  • Target Quality: Traces a 5-block script manually and highlights the exact block containing the bug.
  • Excellence & Polish: Teaches a partner how to step through code block-by-block to find hidden bugs.
๐Ÿ“
Save to Your Website Portfolio:

When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!

โญSelf-Assessment: How confident do you feel with this skill?

Reflect

Interactive content

Interactive reflection

What happens when you execute code one step at a time instead of all at once?

3

Learning check

Learning Check

A sprite needs to reach (100, 0). Line 1: x=0. Line 2: x=x+50. Line 3: x=x-50. Line 4: x=x+50. Which line caused the bug?

Identify the incorrect step in the traced code.

Answer correctly to unlock the next level.

Correct! Line 3 subtracted 50, moving the sprite backwards.Review Line 3 to see how subtracting 50 changed the position.
Teacher setup, curriculum links and progress descriptors

Spark support

Routine: Zoom In

Achievement pathway

  • Foundation: Follows along as code blocks highlight during execution.
  • Developing: Predicts where a character will land after each individual block runs.
  • Secure: Traces a 5-block script manually and highlights the exact block containing the bug.
  • Mastering: Teaches a partner how to step through code block-by-block to find hidden bugs.

Curriculum links

Curriculum strand: algorithms-programming

Outcome: AP.01.B.1.1 โ€” Predict program behavior by tracing execution step-by-step.

PYP: Function ยท Tracing code step-by-step reveals where intent diverges from execution.

Learner profile: Communicator

Competency tags

  • code-tracing
  • prediction
  • debugging

Gate support

Accessibility alternative:

Teacher override: allow

Back to top

Locked level

Level 3: Logic vs Syntax

Complete the previous learning check to unlock this next level.

Level 3

Logic vs Syntax

Distinguish between syntax errors and logical errors in block programs.

Learning objective

Classify bugs as syntax errors (invalid structure) or logic errors (unexpected outcome).

Let's Go!

Learn

Compare a script with a broken snap connection to a script with `score = score - 1`.

Curriculum Level:Level 1
๐Ÿ’ป
Level 1: Minimize, Maximize & Close

Practice using the window control buttons in the top right corner of the window.

๐Ÿ–ฅ๏ธ Virtual Desktops:
Snap Layout:
๐ŸŒ‹Volcano Expedition - Web Browser

Volcanoes: Earth's Fiery Chimneys!

Melted subterranean rock called magma rises through vents. When it erupts onto the surface, it becomes glowing red lava!

๐ŸŒ‹๐Ÿ”ฅ
๐Ÿ“Field Notes - Notepad

My Study Notes

10:45 AM

Try it yourself

Classify and Fix

๐ŸŒŸ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)โ–พ

๐ŸŽฏ Task Success Criteria (Rubric)

Foundation

Recognizes when code fails to run versus when code runs but gives wrong output.

Developing

Distinguishes an unattached block (syntax) from a wrong math operator (logic).

Secure (Goal)

Categorizes a list of 6 bugs as either syntax or logic errors and resolves both types.

Mastery

Analyzes complex scripts and explains how syntax and logic errors interact.

๐Ÿ‘€ What A Good One Looks Like (WAGOLL)

Exemplar Standard

A top-tier student project for Logic vs Syntax includes:

  • Core Deliverable: Classify and Fix
  • Target Quality: Categorizes a list of 6 bugs as either syntax or logic errors and resolves both types.
  • Excellence & Polish: Analyzes complex scripts and explains how syntax and logic errors interact.
๐Ÿ“
Save to Your Website Portfolio:

When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!

โญSelf-Assessment: How confident do you feel with this skill?

Reflect

Why is a logic bug often harder to find than a syntax bug?

Low
High

Learning check

Learning Check

A Scratch game runs without crashing, but the player gains points when hitting an obstacle instead of losing points. What type of bug is this?

Identify the type of bug described.

Answer correctly to unlock the next level.

Spot on! The code is valid syntax, but the logic operator or calculation is wrong.Think again. If the program runs fine but behaves incorrectly, what type of bug is it?
Teacher setup, curriculum links and progress descriptors

Spark support

Routine: See Think Wonder

Achievement pathway

  • Foundation: Recognizes when code fails to run versus when code runs but gives wrong output.
  • Developing: Distinguishes an unattached block (syntax) from a wrong math operator (logic).
  • Secure: Categorizes a list of 6 bugs as either syntax or logic errors and resolves both types.
  • Mastering: Analyzes complex scripts and explains how syntax and logic errors interact.

Curriculum links

Curriculum strand: algorithms-programming

Outcome: AP.02.B.1.1 โ€” Distinguish between syntax errors and logical errors in block programs.

PYP: Connection ยท Programs fail differently depending on whether rules were broken or logic was flawed.

Learner profile: Thinker

Competency tags

  • syntax-errors
  • logic-errors
  • classification

Gate support

Accessibility alternative:

Teacher override: allow

Back to top

Locked level

Level 4: Isolation Methods

Complete the previous learning check to unlock this next level.

Level 4

Isolation Methods

Apply systematic isolation techniques like disabling blocks and speech-bubble printouts.

Learning objective

Isolate problematic code sections using temporary block disconnection and variable say blocks.

Let's Go!

Learn

Debug a multi-sprite project by testing each sprite's script independently.

Curriculum Level:Level 1
๐Ÿ“
Level 1: Desktop Clean-Up & Folders

Your desktop is messy! Drag loose files from the right grid into the folders on the left.

๐Ÿ”
๐Ÿ“„Homework.docx
๐Ÿ–ผ๏ธPuppy.jpg
๐Ÿ“Story_Chapter1.txt
๐ŸŽตClass_Anthem.mp3
๐Ÿ–ผ๏ธField_Trip.png

Try it yourself

Isolate and Resolve

๐ŸŒŸ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)โ–พ

๐ŸŽฏ Task Success Criteria (Rubric)

Foundation

Disconnects blocks randomly when trying to fix a bug.

Developing

Disconnects specific script sections systematically to test modules in isolation.

Secure (Goal)

Uses 'say variable' blocks and temporary script detachment to pinpoint the exact broken block.

Mastery

Develops a structured 4-step debugging protocol for team coding projects.

๐Ÿ‘€ What A Good One Looks Like (WAGOLL)

Exemplar Standard

A top-tier student project for Isolation Methods includes:

  • Core Deliverable: Isolate and Resolve
  • Target Quality: Uses 'say variable' blocks and temporary script detachment to pinpoint the exact broken block.
  • Excellence & Polish: Develops a structured 4-step debugging protocol for team coding projects.
๐Ÿ“
Save to Your Website Portfolio:

When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!

โญSelf-Assessment: How confident do you feel with this skill?

Reflect

Interactive content

Interactive reflection

How does inserting a speech bubble showing variable values help you debug?

3

Learning check

Learning Check

A score variable keeps resetting to 0 during a game with 5 different sprites. How should you locate which script is resetting it?

Choose the best isolation strategy for a complex script.

Answer correctly to unlock the next level.

Excellent! Inspecting variable states or searching for specific assignment blocks isolates the bug.Consider how you can narrow down which sprite contains the faulty command.
Teacher setup, curriculum links and progress descriptors

Spark support

Routine: ShortcutSimulator

Achievement pathway

  • Foundation: Disconnects blocks randomly when trying to fix a bug.
  • Developing: Disconnects specific script sections systematically to test modules in isolation.
  • Secure: Uses 'say variable' blocks and temporary script detachment to pinpoint the exact broken block.
  • Mastering: Develops a structured 4-step debugging protocol for team coding projects.

Curriculum links

Curriculum strand: algorithms-programming

Outcome: AP.02.B.1.1 โ€” Apply systematic isolation techniques like disabling blocks and speech-bubble printouts.

PYP: Change ยท Isolating code components systematically exposes hidden errors.

Learner profile: Principled

Competency tags

  • isolation
  • print-debugging
  • strategy

Gate support

Accessibility alternative:

Teacher override: allow

Back to top

Locked level

Level 5: Edge Case Testing

Complete the previous learning check to unlock this next level.

Level 5

Edge Case Testing

Design test cases that include normal, boundary, and edge case inputs.

Learning objective

Create comprehensive test tables covering standard inputs, zero values, negative numbers, and rapid inputs.

Let's Go!

Learn

Learn how boundary values (0, max values, empty inputs) stress-test code logic.

Content

Unsupported content component

StandardContent

Try it yourself

Build a Test Matrix

๐ŸŒŸ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)โ–พ

๐ŸŽฏ Task Success Criteria (Rubric)

Foundation

Tests programs using only standard positive inputs.

Developing

Identifies obvious edge cases like zero or negative user input.

Secure (Goal)

Constructs a complete test matrix with boundary inputs, unexpected characters, and concurrent events.

Mastery

Evaluates third-party programs by conducting rigorous stress-testing and edge-case audits.

๐Ÿ‘€ What A Good One Looks Like (WAGOLL)

Exemplar Standard

A top-tier student project for Edge Case Testing includes:

  • Core Deliverable: Build a Test Matrix
  • Target Quality: Constructs a complete test matrix with boundary inputs, unexpected characters, and concurrent events.
  • Excellence & Polish: Evaluates third-party programs by conducting rigorous stress-testing and edge-case audits.
๐Ÿ“
Save to Your Website Portfolio:

When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!

โญSelf-Assessment: How confident do you feel with this skill?

Reflect

Why must programmers test inputs that users 'should never' enter?

Low
High

Learning check

Learning Check

A game requires players to be at least 13 years old. Which test values best represent the boundary test?

Identify the boundary edge case for an age input field.

Answer correctly to unlock the next level.

Spot on! Testing just below (12), exactly at (13), and just above (14) tests the exact boundary condition.Think about values immediately around the cutoff age of 13.
Teacher setup, curriculum links and progress descriptors

Spark support

Routine: See Think Wonder

Achievement pathway

  • Foundation: Tests programs using only standard positive inputs.
  • Developing: Identifies obvious edge cases like zero or negative user input.
  • Secure: Constructs a complete test matrix with boundary inputs, unexpected characters, and concurrent events.
  • Mastering: Evaluates third-party programs by conducting rigorous stress-testing and edge-case audits.

Curriculum links

Curriculum strand: algorithms-programming

Outcome: AP.03.B.1.1 โ€” Design test cases that include normal, boundary, and edge case inputs.

PYP: Perspective ยท Robust software requires rigorous testing against extreme and unexpected inputs.

Learner profile: Knowledgeable

Competency tags

  • edge-cases
  • boundary-testing
  • software-testing

Gate support

Accessibility alternative:

Teacher override: allow

Back to top

Locked level

Level 6: Console & Stack Traces

Complete the previous learning check to unlock this next level.

Level 6

Console & Stack Traces

Interpret text console error logs, line numbers, and stack traces to fix complex programs.

Learning objective

Read error messages and stack traces to identify line numbers and error types in text-based or block code.

Let's Go!

Learn

Deconstruct stack trace structures: Error Name, Description, File Name, and Line Number.

Content

Unsupported content component

StandardContent

Try it yourself

Console Diagnostics

๐ŸŒŸ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)โ–พ

๐ŸŽฏ Task Success Criteria (Rubric)

Foundation

Gives up when seeing a text error message or console log.

Developing

Reads the line number provided in an error message to locate the fault.

Secure (Goal)

Interprets stack traces, identifies exception types (e.g., IndexOutOfBounds, TypeError), and fixes runtime faults.

Mastery

Mentors peers in reading developer tools, network logs, and console outputs for full-stack debugging.

๐Ÿ‘€ What A Good One Looks Like (WAGOLL)

Exemplar Standard

A top-tier student project for Console & Stack Traces includes:

  • Core Deliverable: Console Diagnostics
  • Target Quality: Interprets stack traces, identifies exception types (e.g., IndexOutOfBounds, TypeError), and fixes runtime faults.
  • Excellence & Polish: Mentors peers in reading developer tools, network logs, and console outputs for full-stack debugging.
๐Ÿ“
Save to Your Website Portfolio:

When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!

โญSelf-Assessment: How confident do you feel with this skill?

Reflect

Interactive content

Interactive reflection

How do console logs accelerate debugging compared to manual guessing?

3

Learning check

Learning Check

A console outputs: `TypeError: unsupported operand type(s) for +: 'int' and 'str' on line 8`. How do you fix it?

Interpret the console error message.

Answer correctly to complete this strand.

Correct! Line 8 attempted to add a number and a text string together, requiring type conversion.Look at the error description: adding an integer and a string together.
Teacher setup, curriculum links and progress descriptors

Spark support

Routine: Zoom In

Achievement pathway

  • Foundation: Gives up when seeing a text error message or console log.
  • Developing: Reads the line number provided in an error message to locate the fault.
  • Secure: Interprets stack traces, identifies exception types (e.g., IndexOutOfBounds, TypeError), and fixes runtime faults.
  • Mastering: Mentors peers in reading developer tools, network logs, and console outputs for full-stack debugging.

Curriculum links

Curriculum strand: algorithms-programming

Outcome: AP.03.B.1.1 โ€” Interpret text console error logs, line numbers, and stack traces to fix complex programs.

PYP: Reflection ยท Developer diagnostics and error logs provide precise maps to software fixes.

Learner profile: Reflective

Competency tags

  • stack-trace
  • console-logs
  • runtime-errors

Gate support

Accessibility alternative:

Teacher override: allow

๐ŸŽ’ Students Home โ†’

Install App for Classroom

One-click fullscreen learning for Chromebooks, iPads & PCs

๐Ÿ–ฅ๏ธ
Distraction-FreeFullscreen window without browser tabs or search clutter.
โšก
1-Tap LaunchPin directly to the Chromebook shelf, iPad dock, or Windows taskbar.
๐Ÿ“ถ
Classroom SpeedInstant cached loads for lessons and simulators even on school Wi-Fi.
๐Ÿ”’
Safe & Ad-Free100% free, private, and no app store logins or passwords needed.
  1. 1
    Click the Install button

    In your browser, look at the right end of the top web address bar for the ๐Ÿ’ป Install or โค“ icon.

  2. 2
    Confirm "Install"

    A popup will ask if you want to install "Ed Tech Hub". Click Install.

  3. 3
    Pin to your Shelf

    Right-click (or two-finger tap) the app icon in your Chromebook bottom shelf and select "Pin"!