惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
GbyAI
GbyAI
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
月光博客
月光博客
腾讯CDC
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
阮一峰的网络日志
阮一峰的网络日志
博客园 - 【当耐特】
The GitHub Blog
The GitHub Blog
Last Week in AI
Last Week in AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
aimingoo的专栏
aimingoo的专栏
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Martin Fowler
Martin Fowler
A
About on SuperTechFans
博客园 - 叶小钗

博客园 - 苏荷酒吧

曲线Curve three平行光和阴影 three入门 配置Prettier 网易云音乐地址 git本地新建分支并推送到远程仓库 git commit规范 VSCode配置项 Vee Validate Mock数据神器 真机调试 ...使用 nodejs server开发思路 Git远程仓库 日期格式 v-model修饰符 从0到1构建全栈知识体系 Element组件,v-for循环,表单验证方法 上传文件转换为base64图片
Vue工程调试方式
苏荷酒吧 · 2021-05-10 · via 博客园 - 苏荷酒吧

1,VScoed

首先安装Debugger fro Chrome

首先配置vue.config.js

module.exports = {
  configureWebpack: {
    devtool: 'source-map'
  }
}

然后配置VScode运行和调试

{
  // 使用 IntelliSense 了解相关属性。 
  // 悬停以查看现有属性的描述。
  // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "pwa-chrome",
      "request": "launch",
      "name": "Launch Chrome against localhost",
      "url": "http://localhost:8080",
      "webRoot": "${workspaceFolder}/src",
      "sourceMapPathOverrides": {
        "webpack:///src/*": "${webRoot}/*",
        "webpack:///./*": "${webRoot}/*",
      }
    }
  ]
}

可以开启断点调试了

2,vue-devtools

在谷歌浏览器安装插件vue devtools

有很多种配置vue devtools,这里介绍github安装方式

首先

git clone https://github.com/vuejs/vue-devtools.git

然后

cd vue-devtools
yarn install
yarn run build

打开谷歌浏览器

menu - more tools - extensions

打开developer mode

单击load unpacked

然后引入vue-devtools/packages/shell-chrome/