Edit Nov 2016: Node now has a built in debugger that you can start with --inspect
. This answer explains it: https://stackoverflow.com/a/39901169/30946.
In Webstorm now you can just set up using a mocha
configuration. Worked pretty much out of the box for me:
Node interpreter: /usr/local/bin/node
Working directory: /Users/me/sites/mysite
Mocha Package: /Users/me/sites/mysite/node_modules/mocha
and then
All in directory
Test directory: /Users/me/sites/mysite/test
It also shows you the parameters it runs with so you can probably copy them to another environment if you need to.