首页 > 解决方案 > 从命令行启用 Chrome 标志

问题描述

我想在启动 chrome 时启用一个标志(启用令牌绑定)。我可以使用 chrome://flags 页面来做到这一点。但是对于运行测试,我需要从命令行进行。

我试过了

chrome --enable-features=令牌绑定

chrome --启用令牌绑定

他们都没有工作。

标签: google-chromegoogle-chrome-devtools

解决方案


  1. 去铬://版本
  2. 查找命令行参数:

命令行 /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --enable-audio-service-sandbox --flag-switches-begin --enable-features=CookiesWithoutSameSiteMustBeSecure,SameSiteByDefaultCookies --flag-switches-end --启用音频服务沙盒

使用所有参数运行上述命令,您的 chrome 实例将预设所有设置。


推荐阅读