Chrome Flags Reference

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

--crash-on-hang-threads

What does --crash-on-hang-threads do?

Comma-separated list of BrowserThreads that cause browser process to crash if the given browser thread is not responsive. UI/IO are the BrowserThreads that are supported. For example: --crash-on-hang-threads=UI:18,IO:18 --> Crash the browser if UI or IO is not responsive for 18 seconds while the other browser thread is responsive.

Usage

CLILaunch Chrome with --crash-on-hang-threads using CLI

chrome --crash-on-hang-threads

PuppeteerLaunch Chrome with --crash-on-hang-threads using Puppeteer

const browser = await puppeteer.launch({
  args: ['--crash-on-hang-threads']
});

PlaywrightLaunch Chrome with --crash-on-hang-threads using Playwright

const browser = await chromium.launch({
  args: ['--crash-on-hang-threads']
});

SeleniumLaunch Chrome with --crash-on-hang-threads using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--crash-on-hang-threads')

driver = webdriver.Chrome(options=options)