Mac端如何启用Web Bluetooth调试日志?执行命令遇zsh匹配错误
解决Mac zsh下Chrome Web Bluetooth调试日志命令报错问题
问题原因
zsh会自动解析命令中的通配符*,将--vmodule=*bluetooth*=2当作文件匹配规则,当系统中没有匹配该规则的文件时,就会抛出no matches found错误。
修正后的命令
将包含通配符的参数用单引号或双引号包裹,阻止zsh解析通配符:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-logging=stderr '--vmodule=*bluetooth*=2'
或
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-logging=stderr "--vmodule=*bluetooth*=2"
验证步骤
- 彻底关闭所有Chrome实例(包括后台进程,可通过Activity Monitor确认)
- 在终端执行上述修正后的命令启动Chrome
- 打开
chrome://bluetooth-internals/#debug页面即可查看Web Bluetooth调试日志
内容的提问来源于stack exchange,提问作者Wavecake
相关产品推荐
相关产品推荐

