Chrome Flags Reference

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

--wait-for-debugger

What does --wait-for-debugger do?

Will wait for 60 seconds for a debugger to come to attach to the process.

Usage

CLILaunch Chrome with --wait-for-debugger using CLI

chrome --wait-for-debugger

PuppeteerLaunch Chrome with --wait-for-debugger using Puppeteer

const browser = await puppeteer.launch({
  args: ['--wait-for-debugger']
});

PlaywrightLaunch Chrome with --wait-for-debugger using Playwright

const browser = await chromium.launch({
  args: ['--wait-for-debugger']
});

SeleniumLaunch Chrome with --wait-for-debugger using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--wait-for-debugger')

driver = webdriver.Chrome(options=options)