Chrome Flags Reference

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

--enable-tracing-fraction

What does --enable-tracing-fraction do?

When specified along with a value in the range (0,1] will --enable-tracing for (roughly) that percentage of tests being run. This is done in a stable manner such that the same tests are chosen each run, and under the assumption that tests hash equally across the range of possible values. The flag will enable all tracing categories for those tests, and none for the rest. This flag could be used with other tracing switches like --enable-tracing-format, but any other switches that will enable tracing will turn tracing on for all tests.

Usage

CLILaunch Chrome with --enable-tracing-fraction using CLI

chrome --enable-tracing-fraction

PuppeteerLaunch Chrome with --enable-tracing-fraction using Puppeteer

const browser = await puppeteer.launch({
  args: ['--enable-tracing-fraction']
});

PlaywrightLaunch Chrome with --enable-tracing-fraction using Playwright

const browser = await chromium.launch({
  args: ['--enable-tracing-fraction']
});

SeleniumLaunch Chrome with --enable-tracing-fraction using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--enable-tracing-fraction')

driver = webdriver.Chrome(options=options)