using the node inspector



~2 min read


217 words

If you’re running a node application and you want to debug, but don’t want to use the debugger in your text editor, perhaps your text editor doesn’t have a debugger, or maybe you just miss the Chrome dev tools, there’s a solution: use the --inspect flag.

The steps:

  1. Start your node app with the —-inspect flag. So, if you normally start your app with node app.js, not it’s node --inspect app.js

You should see a print out similar to the following:

Debugger listening on ws://
For help, see:
Server running at

What this is saying is that my app is now running on port 3000, just like usual, but also that the debugger is listening on a web socket at port 9229.

  1. On a Chromium browser, go to //inspect. That would be chrome://inspect or brave://inspect if you’re on Brave, etc.

You should now see a screen that looks like this:

inspect page

  1. Click “inspect” and it will open a DevTools window.

Note - you may need to manually add the filesystem. Go to Source and select “Add folder to workspace”. The indication that it wasn’t working for me was the error: Unable to add filesystem permission denied.

Once your files are loaded, however, you have full debugging features available.


Hi there and thanks for reading! My name's Stephen. I live in Chicago with my wife, Kate, and dog, Finn. Want more? See about and get in touch!