Visual Studio Code Chrome 调试器 - 开始调试时出错
Posted
技术标签:
【中文标题】Visual Studio Code Chrome 调试器 - 开始调试时出错【英文标题】:Visual Studio Code Chrome Debugger - Error on starting to debug 【发布时间】:2020-01-06 15:28:12 【问题描述】:在 Visual Studio 代码中启动 chrome 调试器时,它会显示一个弹出窗口,其中指出“找不到类型 'chrome' 的调试适配器。”
我已经尝试在 Chrome 的属性以及 launch.json 中将远程调试端口设置为 9222
这是我目前正在尝试使用的 launch.json:
"version": "0.2.0",
"configurations": [
"name": "Chrome Debug",
"type": "chrome",
"request": "launch",
"url": "http://localhost/app",
"runtimeArgs" : [
"--remote-debugging-port=9222"
],
"webRoot": "$workspaceFolder/path_to_js"
]
【问题讨论】:
【参考方案1】:我有同样的问题。我卸载并重新安装了 Debugger for Chrome 扩展并重新启动了 VS Code。它开始工作了。
【讨论】:
刚刚重启 VSCode 对我有用。我的会话已经退回到几个功能不起作用的状态(git lens 没有显示提交详细信息,VSC 原生的源代码控制选项卡没有感应到本地 repo),所以 chrome 调试器扩展并不奇怪也出现故障。我想 IT 专业人士通常会问:“您是否将其关闭并重新打开?”以上是关于Visual Studio Code Chrome 调试器 - 开始调试时出错的主要内容,如果未能解决你的问题,请参考以下文章