Debugging With Breakpoints Instead of 50 console.log Statements
September 6, 2026 · 5 min read
`console.log` is fine for a quick sanity check, but when tracking down why one item out of 200 has `undefined` props or why an API loop fires twice, interactive breakpoints save massive time.
Three debugger features worth using daily
- **Conditional breakpoints**: right-click a gutter dot and break only when `user.id === 42` or `items.length === 0`.
- **Logpoints**: print variables to the console *without modifying your source code* (no leftover `console.log` commits).
- **Call Stack inspection**: see the exact chain of callers that triggered an unexpected state update.
In Next.js and Node.js, you can also run `node --inspect` or VS Code's JavaScript Debug Terminal to hit breakpoints seamlessly across both server routes and browser code.