dev-tools

Debugger

A debugger is a tool that lets a developer control and inspect a running program — pausing execution at a specific point (a breakpoint), stepping through code line by line, and examining the live values of variables, the call stack, and memory — instead of guessing what's happening from static code reading or scattered print statements. Most modern IDEs ship an integrated debugger (VS Code's built-in debugger, Chrome DevTools for JavaScript running in a browser, `pdb`/`debugpy` for Python, `delve` for Go), communicating with the running process via a debug protocol. Why it matters for AI/SaaS builders: a debugger turns "why is this broken" from an exercise in reading code and hoping, into an exercise in directly observing what's actually happening at the moment it goes wrong — which is dramatically faster for anything beyond a trivial bug. It's also increasingly a tool AI coding agents use themselves: an agentic debugging workflow can set a breakpoint, run the program, inspect the actual runtime values, and use that ground truth to form a correct hypothesis instead of guessing from source alone. How it works: a debugger sets breakpoints (markers that pause execution when reached), then lets you step over (execute the current line and stop at the next), step into (follow execution into a called function), or step out (finish the current function and return to the caller). At any pause, you can inspect the call stack (which functions called which, in order) and evaluate expressions in the current scope, including watching specific variables for changes. Worked example: a developer gets a bug report that a shopping cart total is sometimes wrong. Instead of guessing, they set a breakpoint on the `calculateTotal()` function, reproduce the bug by adding items to a cart in the running app, and the debugger pauses execution right as the function is called. They inspect the `items` array in the debugger's variables panel and immediately see a duplicate entry with the same `id` but different `quantity` — the bug is in the "add to cart" logic merging items incorrectly, not in the total calculation itself as they'd assumed from reading the code. They step out to the calling function, find the faulty merge logic, and fix it — a discovery that would have taken much longer via `console.log` guesswork alone, and one that would have required redeploying the app after adding each new log statement, then reproducing the exact same bug all over again just to see the next piece of information.

Related terms

More Dev Tools terms