1.安装
1.安装vscode软件
2.安装好vscode软件之后,打开项目,然后再安装Debugger for Chrome 插件用于Chrome调试
2.VScode项目配置
1.打开项目界面按F5出现界面选择Chrome
2.添加成功后点击调试,添加配置,自动生成launch.json
在launch.json中:
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:1648",
"webRoot": "${workspaceFolder}"
}]
}
其中url地址为你当前在浏览器中调试的地址