Page tree
Skip to end of metadata
Go to start of metadata

Google's Chrome has the built in debugger that very useful in debugging node.js programs.


For debugger NodeRun see here.


In order to debug a node process you must start that process with debug enabled.

To enable you must run node using 2 switches: --inspect --no-worker 

1) node --inspect start --no-worker

In this terminal, or within the log file, it will show you which port it has a listener connected to:

$ node --inspect start --no-worker
Debugger listening on ws://127.0.0.1:9229/62dcef4a-a7cb-4a18-9f12-f7fb15e40363
For help, see: https://nodejs.org/en/docs/inspector
Profound.js server version 4.13.1 running at http://0.0.0.0:8081/
Node.js version is v10.15.0

2) Open a new Chrome Browser Tab and navigate to chrome://inspect

3) Click the "Open dedicated DevTools for Node" link.

This will open a new popup window.  This is the debugging app.

4) On the connection tab, if you do not see your connection (address:port) in the list, you should add it now.

In the above example, you would add: 127.0.0.1:9229.

As soon as you do this, back on that terminal, or log file, you will see a new line that says: Debugger attached.

5) Now you can go and run your module.

When the node process gets to loading your module, it would then show up in the Debuggers Sources tab.

6) You now you can add breakpoints, look at fields, change their values, etc.