如何在vscode里调试nodejs

 

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"
    }
  ]
}

人工智能学习网站

https://chat.xutongbao.top

posted @ 2024-04-23 15:38  徐同保  阅读(15)  评论(0编辑  收藏  举报  来源