Chrome Flags Reference

Chrome command line switches and startup flags for automation, headless mode, and debugging.

--ssl-key-log-file

What does --ssl-key-log-file do?

Causes SSL key material to be logged to the specified file for debugging purposes. See https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Key_Log_Format for the format.

Usage

CLILaunch Chrome with --ssl-key-log-file using CLI

chrome --ssl-key-log-file

PuppeteerLaunch Chrome with --ssl-key-log-file using Puppeteer

const browser = await puppeteer.launch({
  args: ['--ssl-key-log-file']
});

PlaywrightLaunch Chrome with --ssl-key-log-file using Playwright

const browser = await chromium.launch({
  args: ['--ssl-key-log-file']
});

SeleniumLaunch Chrome with --ssl-key-log-file using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--ssl-key-log-file')

driver = webdriver.Chrome(options=options)