1.

Vscode添加谷歌Debug插件

 

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

Vscode添加谷歌Debug插件

 

3.

Vscode添加谷歌Debug插件

 

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
},
 
]
}

Vscode添加谷歌Debug插件

 

 

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

 

相关文章:

  • 2022-12-23
  • 2021-12-22
  • 2021-09-25
  • 2022-12-23
  • 2021-12-12
猜你喜欢
  • 2021-10-16
  • 2021-10-20
  • 2021-12-26
  • 2021-09-21
  • 2021-04-29
相关资源
相似解决方案