Iman Pouya
Iman Pouya

Reputation: 31

Nestjs how to debug while editing code in VS code

I see there is a couple of answers making custom setups for debugging a NestJs application. However, I noted that in the standard package.json there is a script available "start:debug": "nest start --debug --watch",.

I tried to create a launch.json with the following setup.

{
    "type": "node",
    "request": "launch",
    "name": "Debug Program",
    "cwd": "${workspaceFolder}",
    "runtimeExecutable":"npm",
    "runtimeArgs":["run","start:debug"],
    "autoAttachChildProcesses":true
}

This works fine until i start editing the code. After that breakpoints are completely ignored, even if I remove and add them again.

Upvotes: 3

Views: 4034

Answers (0)

Related Questions