I'm using WebStorm as my node IDE and love it overall but I haven't been able to figure out how to use node supervisor when running node through WebStorm. Has anyone gotten this to work? I think I'm just not sure how to pass through the supervisor
argument so that it uses this when starting the node file.
Asked
Active
Viewed 3,701 times
11

Martijn Pieters
- 1,048,767
- 296
- 4,058
- 3,343

Rick
- 16,612
- 34
- 110
- 163
-
2There is a related feature request: http://youtrack.jetbrains.com/issue/WI-10859 – CrazyCoder Aug 29 '12 at 12:01
-
@Rick did my answer solve your question? – Dave Jensen Mar 25 '13 at 20:05
-
I have added a similar question (and answer) on how to use Nodemon with WebStorm here: http://stackoverflow.com/questions/19180702/how-can-i-run-nodemon-from-within-webstorm – nwinkler Oct 04 '13 at 13:38
2 Answers
11
Install supervisor globally: npm install -g supervisor
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.

Dave Jensen
- 4,574
- 1
- 40
- 45
-
@trigoman Thanks. I'm not sure why this received multiple down votes. I think it works great. – Dave Jensen Mar 25 '13 at 20:05
2
It is amazing that I reach the goal by simply changing the path of node to the path of supervisor. So, I think this will also work for you.
Ps. I'm using WebStorm version 6.0.1.

Fity
- 31
- 3