Expand description
Debugger — programmatic control of the Playwright Inspector “PAUSED” overlay.
Available on every BrowserContext via
debugger(). Used by IDE
integrations and inspector-style tools to pause execution at the next
action call, then resume / step / run-to-location under programmatic
control. Distinct from the MCP / agent codegen path.
§Example
ⓘ
use playwright_rs::Playwright;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let pw = Playwright::launch().await?;
let browser = pw.chromium().launch().await?;
let context = browser.new_context().await?;
let dbg = context.debugger().await?;
// Ask Playwright to pause before the next action runs.
dbg.request_pause().await?;
// ... your IDE / tool decides when to step the user through ...
dbg.resume().await?;
browser.close().await?;
Ok(())
}Structs§
- Debugger
- Programmatic interface to Playwright Inspector’s pause / resume / step controls. See the module docs.
- Paused
Details - Details of the currently paused execution, surfaced via the
pausedStateChangedevent when the inspector overlay is active. - Paused
Location - Source location for
PausedDetails.