项目根目录下新建.vscode文件夹,同时该文件夹下新建launch.json文件 { “configurations”: [ { “type”: “node”, “request”: “launch”, “name”: “nodemon”, “runtimeExecutable”: “nodemon”, “program”: “${workspaceFolder}/app/starter.js”, “restart”: true, “console”: “integratedTerminal”, “internalConsoleOptions”: “neverOpen” } ] } 1.需要在项目跟目录下,不然点击启动调试的时候识别不出来该项目中有这个调试任务