Debug

Provides debugging capabilities within a browser automation script. It allows setting breakpoints to pause script execution and inspect the current state.

Classes

Debug

Methods

(async) breakpoint(nameopt) → {Promise.<void>}

Adds a breakpoint to the script. The browser will pause at the breakpoint, waiting for user input to continue. This is useful for debugging and inspecting the browser state at a specific point in the script.
Parameters:
NameTypeAttributesDescription
namestring<optional>
An optional name for the breakpoint for logging purposes.
Returns:
A promise that resolves when the user chooses to continue from the breakpoint.
Type: 
Promise.<void>
Example
await commands.debug.breakpoint('break');