0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

nx angular-nestのnest側のデバッグ方法

Posted at

環境

・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/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?