系统:MacOS
软件:VSCode
下载了并安装VSCode后,新建Html5页面,安装Chrom和Debugger for Chrom,按F5进行调试报错,查找后发现需要在launch.json文件中配置file属性,默认file属性未配置。
launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}",
"file": "${workspaceFolder}/index.html"
}
]
}