Debugging nest.js application with vscode

前端 未结 10 2082
野的像风
野的像风 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 20:55

    If you want to have log output in terminal + all debug capabilities, you can start + attach using npm, here is config for launch.json:

    {
      "type": "node",
      "request": "launch",
      "name": "Nest Debug",
      "runtimeExecutable": "npm",
      "runtimeArgs": [
        "run",
        "start:debug",
        "--",
        "--inspect-brk"
      ],
      "console": "integratedTerminal",
      "restart": true,
      "protocol": "auto",
      "port": 9229,
      "autoAttachChildProcesses": true
    },
    

    Will show full log output in console + debugging

提交回复
热议问题