website/versioned_docs/version-24.40.0/api/puppeteer.launchoptions.md
Generic launch options that can be passed when launching any browser.
export interface LaunchOptions extends ConnectOptions
Extends: ConnectOptions
Property
</th><th>Modifiers
</th><th>Type
</th><th>Description
</th><th>Default
</th></tr></thead> <tbody><tr><td><span id="args">args</span>
</td><td>optional
string[]
</td><td>Additional command line arguments to pass to the browser instance.
</td><td> </td></tr> <tr><td><span id="browser">browser</span>
</td><td>optional
Which browser to launch.
</td><td>chrome
<span id="channel">channel</span>
</td><td>optional
If specified for Chrome, looks for a regular Chrome installation at a known system location instead of using the bundled Chrome binary.
</td><td> </td></tr> <tr><td><span id="debuggingport">debuggingPort</span>
</td><td>optional
number
</td><td>Specify the debugging port number to use
</td><td> </td></tr> <tr><td><span id="devtools">devtools</span>
</td><td>optional
boolean
</td><td>Whether to auto-open a DevTools panel for each tab. If this is set to true, then headless will be forced to false.
false
<span id="dumpio">dumpio</span>
</td><td>optional
boolean
</td><td>If true, pipes the browser process stdout and stderr to process.stdout and process.stderr.
false
<span id="enableextensions">enableExtensions</span>
</td><td>optional
boolean | string[]
</td><td>If true, avoids passing default arguments to the browser that would prevent extensions from being enabled. Passing a list of strings will load the provided paths as unpacked extensions.
<span id="env">env</span>
</td><td>optional
Record<string, string | undefined>
</td><td>Specify environment variables that will be visible to the browser.
</td><td>The contents of process.env.
<span id="executablepath">executablePath</span>
</td><td>optional
string
</td><td>Path to a browser executable to use instead of the bundled browser. Note that Puppeteer is only guaranteed to work with the bundled browser, so use this setting at your own risk.
Remarks:
When using this is recommended to set the browser property as well as Puppeteer will default to chrome by default.
<span id="extraprefsfirefox">extraPrefsFirefox</span>
</td><td>optional
Record<string, unknown>
</td><td>Additional preferences that can be passed when launching with Firefox.
</td><td> </td></tr> <tr><td><span id="handlesighup">handleSIGHUP</span>
</td><td>optional
boolean
</td><td>Close the browser process on SIGHUP.
true
<span id="handlesigint">handleSIGINT</span>
</td><td>optional
boolean
</td><td>Close the browser process on Ctrl+C.
true
<span id="handlesigterm">handleSIGTERM</span>
</td><td>optional
boolean
</td><td>Close the browser process on SIGTERM.
true
<span id="headless">headless</span>
</td><td>optional
boolean | 'shell'
</td><td>Whether to run the browser in headless mode.
Remarks:
true launches the browser in the new headless mode.
'shell' launches shell known as the old headless mode.
true
<span id="ignoredefaultargs">ignoreDefaultArgs</span>
</td><td>optional
boolean | string[]
</td><td>If true, do not use puppeteer.defaultArgs() when creating a browser. If an array is provided, these args will be filtered out. Use this with care - you probably want the default arguments Puppeteer uses.
false
<span id="pipe">pipe</span>
</td><td>optional
boolean
</td><td>Connect to a browser over a pipe instead of a WebSocket. Only supported with Chrome.
</td><td>false
<span id="signal">signal</span>
</td><td>optional
AbortSignal
</td><td>If provided, the browser will be closed when the signal is aborted.
</td><td> </td></tr> <tr><td><span id="timeout">timeout</span>
</td><td>optional
number
</td><td>Maximum time in milliseconds to wait for the browser to start. Pass 0 to disable the timeout.
30_000 (30 seconds).
<span id="userdatadir">userDataDir</span>
</td><td>optional
string
</td><td>Path to a user data directory. see the Chromium docs for more info.
</td><td> </td></tr> <tr><td><span id="waitforinitialpage">waitForInitialPage</span>
</td><td>optional
boolean
</td><td>Whether to wait for the initial page to be ready. Useful when a user explicitly disables that (e.g. --no-startup-window for Chrome).
true