javascript - WebStorm + Nodemon 中的远程调试问题

标签 javascript node.js debugging webstorm nodemon

我使用 Nodemon 来加速我的开发,因此当我进行一些更改时它会重新启动我的应用程序。

由于 WebStorm 调试无法以标准方式与 Nodemon 一起使用(%NODE_DEBUG%--debug-brk 无法正确触发调试器),我找到了方法我在 WebStorm 中运行 nodemon --debug-brk 和远程调试 session 。

我遇到的问题是,每次当nodemon重新启动我的应用程序时,它都会挂起(应用程序),直到我重新启动远程调试,然后它进入我的入口JS文件,然后我可以“继续”,然后它就可以工作了。这很烦人,我不知道如何正确设置它。

设置 Nodemon+WebStorm 是更好的方法还是以某种方式设置 WebStorm 不会失去与调试 session 的连接?

最佳答案

As WebStorm debug is not working with Nodemon in standard way (%NODE_DEBUG% or --debug-brk does not trigger debugger properly)

WebStorm 允许使用 Node.js 调试与 Nodemon 一起运行的应用程序

enter image description here

NPM运行配置

enter image description here

The issue which I got is that every time when nodemon restarts my app it hangs on (the app) until I will restart my remote debug and then it enters my entry JS file and then I can 'continue' and it works then.

已知问题,WEB-25672

关于javascript - WebStorm + Nodemon 中的远程调试问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46182651/

相关文章:

javascript - 使用 javascript 将 HTML 子选项卡和父选项卡添加到事件类

javascript - 在向我的用户池注册新用户时,我的 IdentityPoolID 是什么?

node.js - 如何在特定环境中的开发机器上启动React App?

mysql - 使用 Node 在准备好的语句中转义数据库名称

.net - pdb 文件实际上是做什么的?

ios - 记录或调试 iOS 的 Firebase HttpMetric 跟踪调用(无需等待 12 小时)

javascript - 如何运送CSS?

javascript - jquery:检测动态生成的输入的变化

javascript - ASP.NET MVC 框架中的 Ajax

javascript - 为什么我的 ES6(使用 Babel)类说 `this` 在实例方法中未定义?