Chrome Flags Reference

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

--trace-to-file-name

What does --trace-to-file-name do?

Specifies the file name for --trace-to-file. If unspecified, it will go to a default file name.

Usage

CLILaunch Chrome with --trace-to-file-name using CLI

chrome --trace-to-file-name

PuppeteerLaunch Chrome with --trace-to-file-name using Puppeteer

const browser = await puppeteer.launch({
  args: ['--trace-to-file-name']
});

PlaywrightLaunch Chrome with --trace-to-file-name using Playwright

const browser = await chromium.launch({
  args: ['--trace-to-file-name']
});

SeleniumLaunch Chrome with --trace-to-file-name using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--trace-to-file-name')

driver = webdriver.Chrome(options=options)