是否有任何分步说明让初学者能够看到在 Chrome 开发者工具中运行的 VSCode 代码的输出?
这是我所做的:使用 VSCode 安装“Debugger for Chrome”3.1.7 扩展 - 扩展安装正常,以及 Live Server 1.6.7。Launch.json 文件如下所示。但是,即使我重新启动 Chrome 和 VSCode,我也无法在 Chrome 开发者工具中看到任何日志。谢谢!
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceRoot}"
},
{
"type": "chrome",
"request": "attach",
"name": "Attach to Chrome",
"port": 9222,
"webRoot": "${workspaceRoot}"
}
]
}