WebSocket URL for the CDP connection, or an async function that returns one.
OptionalconnectionTimeout in milliseconds for establishing the CDP connection.
OptionaldebugEnable debug logging.
OptionalembedWhether to embed the sourcemap as the EVAL_SOURCEMAP global variable
in the bundled code. This makes it available to code running in the CDP
context for its own use.
OptionalenableEnable error sourcemapping: remaps stack traces, task locations, and
error frames from bundled (esbuild output) positions back to original
source positions. Also injects //# sourceURL=filepath so V8
attributes eval'd code to the original file.
OptionalesbuildOptions for esbuild.
OptionalexecutionOptional function to get the execution context or session id. By default, runs Target.setAutoAttach and waits for target to be attached and uses the target's session id.
OptionalhotkeysEnable interactive hotkeys in the terminal.
Currently supports:
d: open the current CDP devtools session in Google Chrome.Optionalenabled?: booleanWhether to enable the hotkeys.
OptionalopenDevtools?: (connection: CdpConnection) => Promise<void>Function to open the devtools session (e.g. in Google Chrome).
OptionalreuseWhether to reuse the CDP connection between watch-mode reruns.
Single-run mode (watch: false, including non-TTY and CI) always
disconnects on stop so the Node process can exit.
It uses signal-exit to disconnect if the process exits while the
connection is still cached for watch mode.
OptionalrpcTimeout in milliseconds for RPC calls to the CDP context.
OptionalrunOptional function to run after the CDP connection is established. Useful for waiting for debugger or something.
OptionalshowWhen true and enableErrorSourcemapping is also true, the original
(bundled) stack trace is preserved as error.bundledStack alongside
the remapped error.stack. Worker runtime frames are kept in the
bundled stack (no frame filtering).
Useful for debugging sourcemap remapping issues.
Options for the CDP pool.