Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试从 nrwl monorep(版本 7.8.1)中调试 NestJS 应用程序。NestJS 应用程序通过 启动ng serve api,其中api是我的 NestJS 应用程序的名称。当我尝试从 Webstorm 附加到 Node 进程进行调试时,这是不可能的,因为 Node 没有使用正确的命令行选项 ( --inspect-brk) 启动。我需要做什么才能让 Node 在此环境中开始侦听调试端口?
ng serve api
api
--inspect-brk
我不确定是否使用ng server命令运行它,但您可以运行ng build api然后运行node --inspect-brk path/to/main.js并以这种方式进行调试。我知道这是一个额外的步骤,但这至少是一个开始。
ng server
ng build api
node --inspect-brk path/to/main.js