WebStorm/IntelliJ run configuration for non-debug:
Name: supervisor app.js
Path to node: <same>
Node Parameters: /usr/local/lib/node_modules/supervisor/lib/cli-wrapper.js --exec /usr/local/bin/node --no-restart-on exit
Working directory: <same>
Path to Node App JS File: app.js
These paths are for Mac OS X 10.8 so you’ll have to replace the above paths with paths on your machine. Next, you’ll be able to run this in debug mode but it doesn’t step through the code.
For debugging you can either use the remote debugger or just have a different run target for debugging without using supervisor.
WebStorm/IntelliJ run configuration for non-debug:
These paths are for Mac OS X 10.8 so you’ll have to replace the above paths with paths on your machine. Next, you’ll be able to run this in debug mode but it doesn’t step through the code.
For debugging you can either use the remote debugger or just have a different run target for debugging without using supervisor.
非常感谢啊,马上测试一下。另外,用supervisor不能很好的DEBUG的话,那有什么更好的方法吗?
测试成功了,拜谢啦~
supervisor 现在一支持debug,因为–debug-brk参数增加了端口指定
supervisor就是个坑爹的 CPU爆高