Coding with AI tools

Stage 6 · Lesson 5 of 6

Using the real debugger

Debugging with AI

The model predicts what your code probably does; the debugger shows what it actually does. Learn your editor's debugger properly: set a , run to it, step over and into calls, inspect variables and watch expressions. For code you cannot pause, such as a server in production, add targeted log lines with the values you need and remove them afterwards.

When the tool's explanation and the debugger disagree, the debugger is right. A good pattern is to let the tool suggest where to put breakpoints or logs, then look yourself. This skill also keeps you independent: you can still fix things when the tool is unavailable or stuck.

Common trapgoing back and forth with the tool for an hour when five minutes with a breakpoint would have shown the wrong value.

A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it

Resources for this stage

Start with

Keep handy

Also worth your time

Mark this stage as not done?