WebStorm Debugger Not Attaching or Breakpoints Not Hit
Quick answer
Start Node with --inspect or --inspect-brk, attach on the port printed in the Debugger listening message (default 9229), and set path mappings if folder names differ.
Most likely fix: Attach to a running Node.js app
How to fix it
Try these in order — the most common fix is first.
1. Attach to a running Node.js app
- Enable the Node.js and JavaScript Debugger plugins in Settings | Plugins
- Run node --inspect-brk <entry file>
- Ctrl+Shift+click the Debugger listening link, or create an Attach to Node.js/Chrome configuration with the host and port
Did this fix it?2. Fix path mappings
- Open Run | Edit Configurations
- Add entries under Remote URLs of local files so the debugger can match local sources to running code
Did this fix it?3. Handle nodemon
- Use the Attach configuration with Reconnect automatically enabled
Did this fix it?4. Check source maps
- Press the Disable Source Maps toggle in the Debug tool window to step through the code that actually runs
Did this fix it?
Symptoms
Debug session never connects, breakpoints stay hollow or are never hit.
Why it happens
- App not started with --inspect
- Port in the configuration does not match the Debugger listening port
- Debugger port equals the app's serving port
- Remote folder name differs from the project root so paths are not mapped
- Source maps point at code that is not what runs
This guide also covers
- webstorm debugger not attaching
- webstorm breakpoints not working
- webstorm attach to node.js
Still not working?
If WebStorm keeps failing, you're not alone. See every WebStorm problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to us