Debugging nest.js application with vscode

前端 未结 10 2207
野的像风
野的像风 2021-02-01 20:24

I am testing the nest.js framework but I am struggling to run it with VSCode so that I can properly debug my code. This is pretty much the same issue as described here Running n

10条回答
  •  青春惊慌失措
    2021-02-01 21:03

    This settings works for me

    {
      "name": "Launch app",
      "type": "node",
      "request": "launch",
      "args": [
        "src/main.ts"
      ],
      "runtimeArgs": [
        "-r",
        "ts-node/register",
        "-r",
        "tsconfig-paths/register"
      ],
      "cwd": "${workspaceRoot}",
      "protocol": "inspector",
      "internalConsoleOptions": "openOnSessionStart",
      "env": {
        "NODE_ENV": "local",
        "NODE_PORT": "9000"
      },
      "sourceMaps": true,
      "console": "internalConsole",
      "outputCapture": "std"
    }
    

    Get it from here

提交回复
热议问题