Debugging nest.js application with vscode

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

    I just have to "promote" this comment by @JWess to a real answer (and update it with the current location of the relevant setting) so it may be found more easily (this worked for me out of the box for a newly generated nest project, without changing any other configuration or file):

    If you go to Settings > Extensions > Node debug and look for the setting Debug › Node: Auto Attach and turn it on, VSCode will auto-attach when you run npm run start:debug (i.e. nest start --debug --watch) in the integrated terminal.

提交回复
热议问题