【WEB】VSCode配置Vue的launch.json和setting.json

说明

配置完成之后就可以直接在Vscode里面按f5就可以直接调试Vue了
【WEB】VSCode配置Vue的launch.json和setting.json_第1张图片

launch.json

{
  "configurations": [
    {
      "command": "npm run dev",
      "name": "Run npm dev",
      "request": "launch",
      "type": "node-terminal"
    },
    {
      "type": "pwa-msedge",
      "name": "Launch Microsoft Edge in headless mode",
      "request": "launch",
      "runtimeArgs": ["--headless", "--remote-debugging-port=9222"],
      "url": "http://127.0.0.1:5173/", // Provide your project's url to finish configuring
      "presentation": {
        "hidden": true
      }
    },
    {
      "type": "vscode-edge-devtools.debug",
      "name": "Open Edge DevTools",
      "request": "attach",
      "url": "http://127.0.0.1:5173/", // Provide your project's url to finish configuring
      "presentation": {
        "hidden": true
      }
    }
  ],
  "compounds": [
    {
      "name": "Launch Edge DevTools",
      "configurations": [
        "Run npm dev",
        "Launch Microsoft Edge in headless mode",
        "Open Edge DevTools"
      ]
    }
  ]
}

也可以直接在setting.json中修改launch的值,方便下次使用

【WEB】VSCode配置Vue的launch.json和setting.json_第2张图片

你可能感兴趣的:(前端,vue.js,vscode)