我使用 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 一起运行的应用程序
或NPM运行配置
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/