1) In Webstorm, create a Remote Debug configuration using port 5858.
2) Make sure the port is open on your server or virtual machine.
3) On the remote server, run Mocha with the option --debug-brk : mocha test --debug-brk
4) Return to Webstorm, run the remote debugger that you created in step 1, and execution should pause at the given breakpoints.
rgwozdz
source share