VS Code Chrome启动调试失效求助(MacOS Ventura 13.2.1)
解决VS Code启动Chrome调试报错"Cannot read properties of undefined (reading 'Stable')"
问题背景
操作系统:MacOS Ventura 13.2.1
VS Code版本:当前版本及1.75.1均尝试过
调试配置(launch.json):
{ "name": "ui", "type": "chrome", "request": "launch", "preLaunchTask": "pre-ui", "url": "http://localhost:4581", "webRoot": "${workspaceFolder}/ui/projects/app", },
执行调试后报错:Unable to launch browser: "Cannot read properties of undefined (reading 'Stable')"
可行解决方案尝试
手动指定Chrome可执行路径
调试插件可能无法自动识别Chrome安装位置,在launch配置中添加runtimeExecutable字段,填入Chrome的绝对路径:{ "name": "ui", "type": "chrome", "request": "launch", "preLaunchTask": "pre-ui", "url": "http://localhost:4581", "webRoot": "${workspaceFolder}/ui/projects/app", "runtimeExecutable": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" }若使用Chrome Canary等变体,替换对应路径即可。
重装/更新Chrome调试插件
打开VS Code扩展面板,找到Debugger for Chrome(或兼容的Microsoft Edge Debugger),先卸载再重新安装最新版本;若仍有问题,尝试回退到插件的旧版本。检查Chrome安装状态
- 确认Chrome可正常手动启动,若无法启动则重新安装Chrome
- 将Chrome更新至最新版本
- 若通过Homebrew安装,执行
brew reinstall google-chrome重新安装
排查配置与扩展冲突
- 删除
.vscode/launch.json后重新创建调试配置 - 临时禁用所有非必要扩展,逐个启用排查是否存在冲突扩展
- 删除
内容的提问来源于stack exchange,提问作者Nelis
相关产品推荐
相关产品推荐

