Coding and Gaming Design - Debugging with AI
K12 AI Labs: Module 5, Lesson 15
Debugging with AI teaches students one of the most important and underrated skills in software development—finding and fixing what's broken—with AI as a collaborator rather than a solution provider. Working through intentionally flawed scripts, students develop the systematic thinking that separates good programmers from those who just copy and paste until something works.
Students begin with a structured introduction to common categories of coding errors: syntax errors, logic errors, runtime errors, and edge case failures. They learn to read error messages, trace execution flow, and form hypotheses about what's going wrong before reaching for any tool.
From there, students use AI tools like ChatGPT and GitHub Copilot to assist in the debugging process—submitting broken code with clear problem descriptions and evaluating the AI's suggestions critically. They practice the essential judgment call of deciding when the AI's fix addresses the real problem versus when it just makes the error message go away.
The lesson builds metacognitive habits around coding: thinking out loud about what code is supposed to do, what it's actually doing, and why the gap exists. These habits improve debugging with or without AI assistance.
Students leave with hands-on experience debugging real code, a systematic process for approaching errors, and a clear sense of how to use AI as a thinking partner rather than an answer machine.
ISTE Standards 1 and 5 aligned.
Details
Details
-
Course LevelMiddle School, High School
What's Included
What's Included
Materials Needed
Materials Needed

ABOUT
K12 AI Labs
