带参启动浏览器以及生成log

文章介绍了在Mac上通过命令行启动Chrome和Firefox的方法,包括启用日志记录的参数,以及日志文件的位置。对于Chrome,还提到了与WebRTC相关的试验参数和Windows下的启动命令。此外,文章提及了一个用于禁用WebRTC加密的参数,但指出这可能仅适用于测试版本的浏览器。
摘要由CSDN通过智能技术生成

For Mac 启动Chrome:

方法一 :

  1. 退出所有正在运行的 Chrome 实例。
  2. 运行终端应用。
  3. 在终端中,运行以下命令:
  4. /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-logging=stderr --v=1 > log.txt 2>&1
  5.  Enter 键。
  6. 上述命令在哪个目录执行,哪里应该就会生成log文件:log.txt

方法二:

启动命令:/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-logging --v=1

查看log在:/Users/yumlu/Library/Application\ Support/Google/Chrome/chrome_debug.log 

另外,加force-fieldtrials参数的话,如:

启动命令:/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-logging --v=1 --force-fieldtrials="WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-logging --v=1 --force-fieldtrials="WebRTC-Bwe-LossBasedBweV2/Enabled,LossThresholdOfHighBandwidthPreference:0.99"

For Mac 启动Firefox: 

/Applications/Firefox.app/Contents/MacOS/firefox --enable-logging --v=1

For Windows启动Chrome:

1.   Launch chrome (assume chrome installation directory is C:\Program Files\Google\Chrome\Application\chrome.exe)

"C:\Program Files\Google\Chrome\Application\chrome.exe" --enable-logging --v=1, --no-sandbox

2.   WebRTC related logs would be generated in User Data Directory which named chrome_debug.log

%LOCALAPPDATA%\Google\Chrome\User Data\chrome_debug.log

如:C:\Users\luyum\AppData\Local\Google\Chrome\User Data\chrome_debug.log

扩展:

disable WebRTC加密的参数为:

 --args --test-type  --disable-webrtc-encryption

正式版本的浏览器应该没有这个参数,可使用Chrome Canary或者自己build的Chromium

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值