如何使用
Debugger for Chrome
这个插件在vscode
中进行debugger
调试。 项目地址:https://github.com/Ewall1106/mall
如何使用 Debugger for Chrome
这个插件在 vscode
中进行 debugger
调试。
vscode
中安装这个扩展。vue-cli3.x+
以上脚手架构建的项目,需要在 vue.config.js
中配置。configureWebpack: {
devtool: "source-map";
}
低版本
脚手架构建的项目,需要先自行设置 source-map
的开启。devtool: "source-map";
launch.json
的文件,选择 Chrome
环境。launch.json
的配置内容改为如下:{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Panda-mall debugger",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/src",
"breakOnLoad": false,
"sourceMapPathOverrides": {
"webpack:///./*": "${webRoot}/*",
"webpack:///src/*": "${webRoot}/*"
}
}
]
}
51
行)。play
按钮启动调试的时候,会自动在浏览器中打开 http://localhost:8080
实例,然后vscode
中设置的断点就被命中了。image
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有