VScode调试html网页
1.安装debugger for chrome和debugger for Microsoft Edge插件。
2.使用本机浏览器进行调试,需要修改launch.json文件内容,以我的设备上的配置文件为例:
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-msedge",
"request": "launch",
"name": "Open HTMLPage1.html",
"file": "${file}"
},
{
"name": "使用本机 Chrome 调试",
"type": "chrome",
"request": "launch",
"file": "${file}",
// "url": "http://mysite.com/index.html",