VSCode Vue Debug

安装插件

Debugger for Chrome

image

配置环境

1.生成launch.json

image

2. 修改launch.json

image

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "pwa-chrome",
      "request": "launch",
      "name": "Launch Chrome against localhost",
      // 配置项目实际端口号
      // http://localhost:1024/admin
      "url": "http://localhost:8081",
      "webRoot": "${workspaceFolder}/src",
      "breakOnLoad": true,
      "sourceMapPathOverrides": {
        "webpack:///src/*": "${webRoot}/*"
      }
    }
  ]
}

开始Debug

1. 启动vue项目

image

2. 启动Debug

按 F5 启动

image

posted @ 2022-05-27 15:46  逢生博客  阅读(1003)  评论(0)    收藏  举报