Chrome Flags Reference

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

--net-log-max-size-mb

What does --net-log-max-size-mb do?

Sets the maximum size, in megabytes. The log file can grow to before older data is overwritten. Do not use this flag if you want an unlimited file size.

Usage

CLILaunch Chrome with --net-log-max-size-mb using CLI

chrome --net-log-max-size-mb

PuppeteerLaunch Chrome with --net-log-max-size-mb using Puppeteer

const browser = await puppeteer.launch({
  args: ['--net-log-max-size-mb']
});

PlaywrightLaunch Chrome with --net-log-max-size-mb using Playwright

const browser = await chromium.launch({
  args: ['--net-log-max-size-mb']
});

SeleniumLaunch Chrome with --net-log-max-size-mb using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--net-log-max-size-mb')

driver = webdriver.Chrome(options=options)