如何在vscode里调试nodejs_json

 

npm install -g nodemon

 

launch.json:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Nodemon",
      "type": "node",
      "request": "launch",
      "runtimeExecutable": "nodemon",
      "runtimeArgs": ["--inspect", "--watch", "."],
      "args": [
        "app.js" // 你的启动文件
      ],
      "restart": true,
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen"
    }
  ]
}

如何在vscode里调试nodejs_启动文件_02

如何在vscode里调试nodejs_json_03