Skip to main content

DebuggerClient

Struct DebuggerClient 

Source
pub struct DebuggerClient { /* private fields */ }
Expand description

Client for Debugger domain commands.

Implementations§

Source§

impl DebuggerClient

Source

pub async fn continue_to_location( &self, params: ContinueToLocationParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Continues execution until specific location is reached.

Source

pub async fn disable(&self, session_id: Option<&str>) -> Result<Value, CdpError>

Disables debugger for given page.

Source

pub async fn enable( &self, params: EnableParams, session_id: Option<&str>, ) -> Result<EnableReturns, CdpError>

Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.

Source

pub async fn evaluate_on_call_frame( &self, params: EvaluateOnCallFrameParams, session_id: Option<&str>, ) -> Result<EvaluateOnCallFrameReturns, CdpError>

Evaluates expression on a given call frame.

Source

pub async fn get_possible_breakpoints( &self, params: GetPossibleBreakpointsParams, session_id: Option<&str>, ) -> Result<GetPossibleBreakpointsReturns, CdpError>

Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.

Source

pub async fn get_script_source( &self, params: GetScriptSourceParams, session_id: Option<&str>, ) -> Result<GetScriptSourceReturns, CdpError>

Returns source for the script with given id.

Source

pub async fn disassemble_wasm_module( &self, params: DisassembleWasmModuleParams, session_id: Option<&str>, ) -> Result<DisassembleWasmModuleReturns, CdpError>

Source

pub async fn next_wasm_disassembly_chunk( &self, params: NextWasmDisassemblyChunkParams, session_id: Option<&str>, ) -> Result<NextWasmDisassemblyChunkReturns, CdpError>

Disassemble the next chunk of lines for the module corresponding to the stream. If disassembly is complete, this API will invalidate the streamId and return an empty chunk. Any subsequent calls for the now invalid stream will return errors.

Source

pub async fn get_wasm_bytecode( &self, params: GetWasmBytecodeParams, session_id: Option<&str>, ) -> Result<GetWasmBytecodeReturns, CdpError>

This command is deprecated. Use getScriptSource instead.

Source

pub async fn get_stack_trace( &self, params: GetStackTraceParams, session_id: Option<&str>, ) -> Result<GetStackTraceReturns, CdpError>

Returns stack trace with given stackTraceId.

Source

pub async fn pause(&self, session_id: Option<&str>) -> Result<Value, CdpError>

Stops on the next JavaScript statement.

Source

pub async fn pause_on_async_call( &self, params: PauseOnAsyncCallParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Source

pub async fn remove_breakpoint( &self, params: RemoveBreakpointParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Removes JavaScript breakpoint.

Source

pub async fn restart_frame( &self, params: RestartFrameParams, session_id: Option<&str>, ) -> Result<RestartFrameReturns, CdpError>

Restarts particular call frame from the beginning. The old, deprecated behavior of restartFrame is to stay paused and allow further CDP commands after a restart was scheduled. This can cause problems with restarting, so we now continue execution immediatly after it has been scheduled until we reach the beginning of the restarted frame.

To stay back-wards compatible, restartFrame now expects a mode parameter to be present. If the mode parameter is missing, restartFrame errors out.

The various return values are deprecated and callFrames is always empty. Use the call frames from the Debugger#paused events instead, that fires once V8 pauses at the beginning of the restarted function.

Source

pub async fn resume( &self, params: ResumeParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Resumes JavaScript execution.

Source

pub async fn search_in_content( &self, params: SearchInContentParams, session_id: Option<&str>, ) -> Result<SearchInContentReturns, CdpError>

Searches for given string in script content.

Source

pub async fn set_async_call_stack_depth( &self, params: SetAsyncCallStackDepthParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Enables or disables async call stacks tracking.

Source

pub async fn set_blackbox_execution_contexts( &self, params: SetBlackboxExecutionContextsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Replace previous blackbox execution contexts with passed ones. Forces backend to skip stepping/pausing in scripts in these execution contexts. VM will try to leave blackboxed script by performing ‘step in’ several times, finally resorting to ‘step out’ if unsuccessful.

Source

pub async fn set_blackbox_patterns( &self, params: SetBlackboxPatternsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing ‘step in’ several times, finally resorting to ‘step out’ if unsuccessful.

Source

pub async fn set_blackboxed_ranges( &self, params: SetBlackboxedRangesParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing ‘step in’ several times, finally resorting to ‘step out’ if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn’t blackboxed. Array should be sorted.

Source

pub async fn set_breakpoint( &self, params: SetBreakpointParams, session_id: Option<&str>, ) -> Result<SetBreakpointReturns, CdpError>

Sets JavaScript breakpoint at a given location.

Source

pub async fn set_instrumentation_breakpoint( &self, params: SetInstrumentationBreakpointParams, session_id: Option<&str>, ) -> Result<SetInstrumentationBreakpointReturns, CdpError>

Sets instrumentation breakpoint.

Source

pub async fn set_breakpoint_by_url( &self, params: SetBreakpointByUrlParams, session_id: Option<&str>, ) -> Result<SetBreakpointByUrlReturns, CdpError>

Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads.

Source

pub async fn set_breakpoint_on_function_call( &self, params: SetBreakpointOnFunctionCallParams, session_id: Option<&str>, ) -> Result<SetBreakpointOnFunctionCallReturns, CdpError>

Sets JavaScript breakpoint before each call to the given function. If another function was created from the same source as a given one, calling it will also trigger the breakpoint.

Source

pub async fn set_breakpoints_active( &self, params: SetBreakpointsActiveParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Activates / deactivates all breakpoints on the page.

Source

pub async fn set_pause_on_exceptions( &self, params: SetPauseOnExceptionsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions, or caught exceptions, no exceptions. Initial pause on exceptions state is none.

Source

pub async fn set_return_value( &self, params: SetReturnValueParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Changes return value in top frame. Available only at return break position.

Source

pub async fn set_script_source( &self, params: SetScriptSourceParams, session_id: Option<&str>, ) -> Result<SetScriptSourceReturns, CdpError>

Edits JavaScript source live.

In general, functions that are currently on the stack can not be edited with a single exception: If the edited function is the top-most stack frame and that is the only activation of that function on the stack. In this case the live edit will be successful and a Debugger.restartFrame for the top-most function is automatically triggered.

Source

pub async fn set_skip_all_pauses( &self, params: SetSkipAllPausesParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).

Source

pub async fn set_variable_value( &self, params: SetVariableValueParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.

Source

pub async fn step_into( &self, params: StepIntoParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Steps into the function call.

Source

pub async fn step_out( &self, session_id: Option<&str>, ) -> Result<Value, CdpError>

Steps out of the function call.

Source

pub async fn step_over( &self, params: StepOverParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Steps over the statement.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more