Node – inspect (github.com/nodejs/node… The nodeJS application only needs to send a signal to the nodeJS application process to enable debug mode and start debugging line. For example, our nodeJS application runs on port 3000 and we find the corresponding process:
lsof -i tcp:3000
Copy the code
We find that the corresponding PID is 35294, and use Node-inspect to signal to the corresponding Node process
node-inspect -p 35294
Copy the code
Then we can see that the corresponding NodeJS application has received the signal
We can debug our application directly via Inspect. With this in mind, we can add Chrome inspect to send messages directly to our machine externally, and when the machine receives our message, we can turn on this capability so that we can apply directly to the debug line without rebooting. Avoid some weird problems such as: rebooting application bugs disappear, etc.