First step is to always use at least the latest LTS version of Node (8.x).
Next get acquainted with how to run your process without npm or yarn, for you will need to be able to run it with node process flags. For example, for looking-glass we start our server using an index.js
file in the root of the project. So instead of running yarn start
, we would run node index.js
.
Now by default node doesn't have the "inspector" on in the process. You have to turn it on and there are a couple ways to do that. First, and the most common, is to pass a flag to the command; node --inspect index.js
or node --inspect-brk index.js
. Next, you can activate it by sending a SIGUSR1
to the running process; kill -s SIGUSR1 <pid>