7 VS Code Debugging Tips That Most Developers Skip
The built-in VS Code debugger is more powerful than most people realize. Here are 7 underused features, plus one AI trick that ties them all together.
Most Developers Are Only Using 20% of the VS Code Debugger
The VS Code debugger has been the most underused tool in most developers' toolboxes since VS Code launched. Here are 7 features that will change how you debug.
1. Logpoints Instead of console.log
You do not need to add console.log statements, save, re-run, and then remove them. VS Code has logpoints, which are breakpoints that log a message without stopping execution.
Right-click the gutter, select Add Logpoint, and type your message with {variableName} for live values. The log shows in the Debug Console. No code changes, no cleanup.
2. Conditional Breakpoints
Stop clicking Continue hundreds of times to hit the iteration where the bug happens.
Right-click a breakpoint, select Edit Breakpoint, and enter a condition like i === 47 or user.id === null. The debugger only pauses when the condition is true.
3. The Watch Panel
Instead of hovering over variables one by one, pin expressions to the Watch panel (the eye icon in the Debug sidebar). They update live as you step through code.
You can watch complex expressions too:
4. launch.json Configurations
If you are pressing F5 and fighting with the wrong interpreter or environment, you have not configured launch.json properly.
Create .vscode/launch.json with:
Now F5 always starts your app correctly with the right environment.
5. Debug Console Expressions
The Debug Console is not just for output. You can run arbitrary expressions while paused at a breakpoint. Call functions, modify variables, and test fixes before you write them.
Try it: pause at a breakpoint, click the Debug Console, and type any expression. It evaluates in the current scope.
6. Multi-Target Debugging
If you are running a frontend and backend at the same time, attach the debugger to both simultaneously using a compound launch configuration:
Both debug sessions run in parallel in the same VS Code window.
7. Exception Breakpoints
In the Debug sidebar, check Raised Exceptions under Breakpoints. The debugger pauses the moment any exception is thrown, before it propagates up the call stack. You see the exact state at the point of failure, not after it unwinds.
This is the fastest way to find the real source of any exception.
The One Thing That Ties All of This Together
All of the above helps you find bugs faster manually. But there is still a ceiling: once you find the bug, you still need to know how to fix it in the context of your specific codebase.
That is where DebugAI comes in. It does the traversal, reading your call chain, checking your imports, understanding your architecture, and gives you the fix directly.
Press Ctrl+Shift+D. Under 10 seconds. No manual stepping required.
Install DebugAI free from the VS Code marketplace. First 5 debug sessions daily are free, no credit card needed.
Debug faster starting today.
Free VS Code extension. 10 sessions/day. No credit card.