Debugging with DevTools
Reproduce failures, inspect values and call stacks, and reduce bugs to a testable cause.
Lesson introduction
Debugging is a controlled comparison between what you expected and what actually happened. Reproduce the smallest failing case, pause near the first incorrect value, inspect the call stack and inputs, then test one explanation at a time.
Where this fits
This lesson builds one part of the path from language fundamentals to complete browser applications.
What you will build
Use a breakpoint or assertion to locate the first incorrect value in a small calculation.
You will first study the underlying rule, then trace worked code, repair a mistake, and create an independent solution.