vscode在调试vue.代码时,如何进行debug?
1.安装Chrome Debug插件。
2.在launch.json中,将url修改成你前端项目的路径:
1 { 2 // Use IntelliSense to learn about possible attributes. 3 // Hover to view descriptions of existing attributes. 4 // For more @R_449_4045@ion,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中配置:
完成以上配置,重启项目,打上断点即可。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。