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

This page explains how to debug Profound.js programs using Google Chrome's built-in debugger. For debugging Profound.js Spaces programs, 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://
For help, see:
Profound.js server version 4.13.1 running at
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:

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.