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",
  9       "request": "launch",
 10       "name": "Chrome 调试",
 11       "url": "http://localhost:8090/#/login",
 12       "webRoot": "${workspaceFolder}/src",
 13       "breakOnLoad": false,
 14       "sourceMapPathOverrides": {
 15         "webpack:///src/*": "${webRoot}/*"
 16       }
 17     }
 18   ]
 19 }

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

clipboard

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

clipboard

clipboard

相关推荐

  1. vscode 如何debug(二)

    2023-12-11 07:00:03       10 阅读
  2. vueref()用法

    2023-12-11 07:00:03       36 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-11 07:00:03       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-11 07:00:03       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-11 07:00:03       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-11 07:00:03       20 阅读

热门阅读

  1. vscode 编写爬虫爬取王者荣耀壁纸

    2023-12-11 07:00:03       43 阅读
  2. Linux数据库Mysql增删改查

    2023-12-11 07:00:03       34 阅读
  3. esp32服务器与android客户端的tcp通讯

    2023-12-11 07:00:03       37 阅读
  4. rust宏(macro)详解

    2023-12-11 07:00:03       42 阅读
  5. MYSQL数据类型详解

    2023-12-11 07:00:03       40 阅读
  6. 数组 注意事项

    2023-12-11 07:00:03       29 阅读
  7. GraphSAGE

    GraphSAGE

    2023-12-11 07:00:03      37 阅读
  8. C/C++语言的安全编码规范

    2023-12-11 07:00:03       34 阅读
  9. 计算机视觉-机器学习-人工智能顶会 会议地址

    2023-12-11 07:00:03       36 阅读
  10. 【求职】外企德科-网易游戏测试面试记录

    2023-12-11 07:00:03       37 阅读
  11. git commit语义规范

    2023-12-11 07:00:03       33 阅读