跳到主要内容
CNode

请问webstorm里怎么设置supervisor 啊

社区
Ggblackfire发布于 13 年前最后回复 13 年前
595840

各位大神,小的是Node.js的初学者,请教各位,在MAC 上用webstorm编写NODE.JS,怎么设置supervisor呢?我用npm安装了supervisor,但是不知道怎么在webstorm上设置,还请大神们帮帮忙啊~~~

查看回复

回复 (5)

X
xujun52011#513 年前

supervisor就是个坑爹的 CPU爆高

M
mx1700#413 年前
引用 gblackfire测试成功了,拜谢啦

supervisor 现在一支持debug,因为--debug-brk参数增加了端口指定

G
gblackfire#313 年前

测试成功了,拜谢啦~

G
gblackfire#213 年前

非常感谢啊,马上测试一下。另外,用supervisor不能很好的DEBUG的话,那有什么更好的方法吗?

S
se77en#113 年前

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.

参与回复

登录后即可参与回复。登录