pub struct Debugger { /* private fields */ }Expand description
Programmatic interface to Playwright Inspector’s pause / resume / step controls. See the module docs.
Implementations§
Source§impl Debugger
impl Debugger
pub fn new( parent: ParentOrConnection, type_name: String, guid: Arc<str>, initializer: Value, ) -> Result<Self>
Sourcepub async fn request_pause(&self) -> Result<()>
pub async fn request_pause(&self) -> Result<()>
Asks Playwright to pause before the next action runs. The pause
is surfaced via the pausedStateChanged event (register a
handler with Debugger::on_paused_state_changed).
Sourcepub async fn run_to(&self, location: PausedLocation) -> Result<()>
pub async fn run_to(&self, location: PausedLocation) -> Result<()>
Run to a specific source location, then pause.
Sourcepub fn paused_details(&self) -> Option<PausedDetails>
pub fn paused_details(&self) -> Option<PausedDetails>
Returns the current paused-state details, or None if execution
is not currently paused. Updated as pausedStateChanged events
arrive.
Sourcepub fn on_paused_state_changed<F, Fut>(&self, handler: F)
pub fn on_paused_state_changed<F, Fut>(&self, handler: F)
Register a handler for the pausedStateChanged event. The
handler receives Some(details) when execution becomes paused
and None when it resumes.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Debugger
impl !RefUnwindSafe for Debugger
impl Send for Debugger
impl Sync for Debugger
impl Unpin for Debugger
impl UnsafeUnpin for Debugger
impl !UnwindSafe for Debugger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more