VSCode如何设置Vue前端的debug调试

 

 

vscode在调试vue.代码时,如何进行debug?

1.安装Chrome Debug插件。

clipboard

2.在launch.json中,将url修改成你前端项目的路径:

clipboard

  1 {
  2   // Use IntelliSense to learn about possible attributes.
  3   // Hover to view descriptions of existing attributes.
  4   // For more information,visit: https://go.microsoft.com/fwlink/?linkid=830387
  5   "version": "0.2.0",  6   "configurations": [
  7     {
  8       "type": "chrome",1)">  9       "request": "launch",1)"> 10       "name": "Chrome 调试",1)"> 11       "url": "http://localhost:8090/#/login",1)"> 12       "webRoot": "${workspaceFolder}/src",1)"> 13       "breakOnLoad": false,1)"> 14       "sourceMapPathOverrides": {
 15         "webpack:///src/*": "${webRoot}/*"
 16       }
 17     }
 18   ]
 19 }

3.vue-cli2版本的,修改config/index.js中配置:

clipboard

完成以上配置,重启项目,打上断点即可。

clipboard

clipboard

相关文章

问题背景 最近小伙伴提了一个希望提高后台下拉列表可操作性的...
// n位随机数生成 function randomNum(n) { let sString = &...
HTML是HyperText Markup Language的简称,中文名称:超文本标...
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现...
JavaScript 是脚本语言,是一种解释性脚本语言(代码不进行预...
本文由葡萄城技术团队原创并首发 转载请注明出处:葡萄城官网...