Vscode添加谷歌Debug插件

1.

 

2.安装好 Debugger for Chrome之后,找到要进行Debug的文件

 

3.

 

4.进入到launch.json文件中进行相应的配置

配置文件内容如下:

 

{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
//为调试的主机设置一个名称
"name": "使用本机Chrome调试",
//配置此属性可以做到点击哪个文件就能去debug哪个文件
"file": "${file}",
"sourceMaps": true,
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}",
"userDataDir": "${tmpdir}",
// 告诉vscode可以通过连接chrome浏览器的9222端口对http://localhost:8080网页进行调试;
"port": 9222
},
 
]
}

 

 

5.完成相应的配置文件之后,选择要debug的文件,按F5就可以进入Debug模式了

 

posted @ 2019-07-05 17:03  变体精灵  阅读(1888)  评论(0编辑  收藏  举报