Search code examples
node.jsdebuggingwebstormremote-debugging

WebStorm: node.js debugger vs remote node.js


I've encountered two debugging configurations for node.js in WebStorm: Node.JS debug and node.js Remote Debug. You can see both of them here:

enter image description here

My question is what is the difference between these two? and when should we use each one of them?


Solution

  • With Remote Debug configuration, you can attach the debugger to already running Node application started with --debug-brk. See https://www.jetbrains.com/help/webstorm/2016.3/running-and-debugging-node-js.html#remote_debugging, https://confluence.jetbrains.com/display/WI/Running+and+debugging+Node.js+application#RunninganddebuggingNode.jsapplication-DebuggingNode.jsappthatrunsremotely

    With Node.js run configuration, you can start the Node.js interpreter (either local or remote) and pass your application to it.