1、Vue.js devtoolsvue
安装后打开vue项目会有以下标志webpack
2、在 VS Code 中安装了 Debugger for Chromeweb
点击调试按钮,将launch.json里的内容换成以下:chrome
{ "version": "0.2.0", "configurations": [ { "type": "chrome", "request": "launch", "name": "vuejs: chrome", "url": "http://localhost:8080", "webRoot": "${workspaceFolder}/src", "breakOnLoad": true, "sourceMapPathOverrides": { "webpack:///src/*": "${webRoot}/*" } } ] }
使用:打断点,点击运行按钮 3、直接debuggerjson