1.在VS Code中安装Debugger for Firefox插件
2.下载安Firefox Developer Edition
3. 创建launch.json
编辑并保存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": [
{
"name": "Launch MyDraw.html",
"type": "firefox",
"request": "launch",
"reAttach": true,
"file": "${workspaceFolder}/MyDraw.html"
}
]
}
4.开始调试
5.设置断点开始调试,html中的javasript的代码也可以调试