Debugging nest.js application with vscode

前端 未结 10 2085
野的像风
野的像风 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:01

    Try this launch.json:

    {
        // Use IntelliSense to learn about possible attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [
            {
                "type": "node",
                "request": "launch",
                "name": "Debug Nest Framework",
                "args": ["${workspaceFolder}/src/main.ts"],
                "runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
                "sourceMaps": true,
                "cwd": "${workspaceRoot}",
                "protocol": "inspector"
            }
        ]
    }
    

提交回复
热议问题