WebStorm:node.js 调试器与远程 node.js

WebStorm: node.js debugger vs remote node.js

我在 WebStorm 中遇到了 node.js 的两个调试配置: Node.JS 调试和 node.js 远程调试。你可以在这里看到它们:

我的问题是这两者有什么区别?我们什么时候应该使用它们中的每一个?

使用远程调试配置,您可以将调试器附加到已经 运行 已使用 --debug-brk 启动的节点应用程序。参见 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

使用 Node.js 运行 配置,您可以启动 Node.js 解释器(本地或远程)并将您的应用程序传递给它。