Setting Breakpoints
Pause execution and inspect state.
What Is a Breakpoint
A breakpoint tells the debugger to pause execution at a specific line. While paused, you can inspect variables and the call stack to understand the program state.
Why Breakpoints Beat Logging
Compared with scattering log statements, breakpoints let you examine every variable in scope at a moment without changing the code, and you can continue or step from there.
All lessons in this course
- Beyond console.log
- Setting Breakpoints
- Stepping Through Code
- Reading Stack Traces