For Mac 启动Chrome:
方法一 :
- 退出所有正在运行的 Chrome 实例。
- 运行终端应用。
- 在终端中,运行以下命令:
- /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-logging=stderr --v=1 > log.txt 2>&1
- 按 Enter 键。
- 上述命令在哪个目录执行,哪里应该就会生成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