admin管理员组文章数量:1387419
- MacOS
- WebStorm
- Docker
- Node 20.18.0
- Nest 11.0.5
I'm running my NestJS application with the following command:
nest start --debug 0.0.0.0:9229 --watch
Whenever I make changes to a file, the process restarts as expected. However, it seems like the previous debugger instance doesn’t fully disconnect before the new one starts.
As a result, on every odd-numbered change, the debugger fails with:
Starting inspector on 0.0.0.0:9229 failed: address already in use
Then, on the next (even-numbered) change, it connects successfully:
Debugger listening on ws://0.0.0.0:9229/125a0c3c-c6d2-4f1e-b5eb-fbe109676996
It looks like the debugger is taking a bit too long to release the port before the next instance starts.
How can I ensure the debugger properly disconnects before restarting, so it consistently attaches every time?
本文标签: nodejsNestJSdebug with watch modeport taking too long to get releasedStack Overflow
版权声明:本文标题:node.js - NestJS - debug with watch mode - port taking too long to get released - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744492325a2608809.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论