不用设置launch.json文件
launch.json
1.打开设置搜索deubg.node 2.将debug.node:Auto Attach开关打开 3.node --inspect启动项目,然后在代码里添加断点即可
deubg.node
debug.node:Auto Attach
node --inspect