So I have a node.js
application which I am running in cluster mode
using pm2
. I am passing the following options for the web node in my pm2
schema.
exec-mode : "cluster"
--node-args : ["--inspect=5678"]
and for worker node I am passing following configuration
--node-args=["--inspect=5679"]
When I start my application in cluster mode
, debugging is not possible as I cannot see the debugging URL printed in pm2
logs. Even if I send the USR1 signal to the web or worker node (as mentioned in node inspector help ), I do not see any way to debug the processes.
My guess is that in cluster mode
, debugging node.js
is not possible. I tried the same process with node-inspector
but no luck yet.
将node_args作为字符串而不是数组传递(例如--node-args =“-inspect = 1234”)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.