環境
・VSCode
・Windows10
・"@nrwl/workspace": "14.4.3"
手順
サーバー起動して
nx run api:serve --inspect=inspect
VSCodeのDebug&RunでAttach NestJS WSを選択。
launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach NestJS WS",
"restart": true,
}
]
}
Angular側はデフォルトのまま
proxy.conf.json
{
"/api": {
"target": "http://localhost:3333",
"secure": false
}
}
参考
https://stackoverflow.com/a/60987737/13463726
VSCodeのauto attachはうまく動かなかった
https://stackoverflow.com/a/68630866/13463726
https://code.visualstudio.com/blogs/2018/07/12/introducing-logpoints-and-auto-attach
参考にならなかった
https://blog.davidjs.com/2021/05/debugging-nestjs-app-in-nrwl-nx-workspace/