localhost:9229 (Node.js debugger): not working and fixes
Port 9229 is the Node.js debugger port. How to connect Chrome or VS Code and stay safe.
Not a web pagePort 9229 is the Node.js debugger. Use Chrome DevTools or VS Code, not a normal browser tab.
localhost:9229 is the Node.js debugger, not a web page. You start it with --inspect, then connect Chrome DevTools or Visual Studio Code to it.
What runs on localhost:9229
- Node.js started with
--inspector--inspect-brk
Commands to start and test port 9229
node --inspect app.jsnode --inspect-brk app.jscurl http://localhost:9229/jsonFind what is using port 9229
Run these in a terminal on your computer. Nothing is sent to this site.
If localhost:9229 will not open
- The safe way to debug a remote server
- Node’s guide says never let the debugger listen on a public address: anyone who can reach it can run code. Keep the default 127.0.0.1:9229 and tunnel instead: on your computer run
ssh -L 9221:localhost:9229 user@remote.example.com, then attach Chrome DevTools or VS Code tolocalhost:9221. - Attach Chrome or Edge
- Open
chrome://inspect(oredge://inspect), choose Configure and check that your host and port are listed. The app should appear under Remote Target.http://localhost:9229/json/listalso lists the debug targets and their devtoolsFrontendUrl. - The browser shows nothing useful
- Port 9229 is for debugger tools. In Chrome open chrome://inspect and choose your Node process.
- ECONNREFUSED on port 9229
- Node was not started with --inspect, or it has already stopped.
- Port 9229 is already in use
- Another program is on port 9229. Find it with the tool below and stop it, or start yours on another port.
Other ports like 9229
| Port | Usually used by |
|---|---|
| localhost:11434 | Ollama (AI models) |
| localhost:5601 | Kibana |
| localhost:11501 | Khajane 2 helper (reported) |
| localhost:9200 | Elasticsearch |
| localhost:5672 | RabbitMQ |
| localhost:15672 | RabbitMQ admin page |
| localhost:9090 | Prometheus |
Questions about localhost:9229
- How do I debug Node.js in Chrome?
- Start with node --inspect app.js, open chrome://inspect in Chrome, and click inspect under your process.
- Is localhost:9229 safe?
- Only while it stays on localhost. Anyone who can reach the debugger port can run code on your computer, so never expose port 9229 to a network or the internet.