cdp_driver/protocol/event_breakpoints.rs
1// @generated by `just generate-methods` from protocol/*.json.
2// Do not edit by hand; edit xtask/ and regenerate.
3
4//! EventBreakpoints permits setting JavaScript breakpoints on operations and
5//! events occurring in native code invoked from JavaScript. Once breakpoint
6//! is hit, it is reported through Debugger domain, similarly to regular
7//! breakpoints being hit.
8//!
9//! Types, command parameters and event payloads for the `EventBreakpoints`
10//! domain. The method-name constants for the same domain are in
11//! [`crate::methods`].
12//!
13//! This domain is experimental and may change without notice.
14
15use serde::{Deserialize, Serialize};
16
17/// Sets breakpoint on particular native event.
18///
19/// Parameters of `EventBreakpoints.setInstrumentationBreakpoint`.
20#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
21pub struct SetInstrumentationBreakpointParams {
22 /// Instrumentation name to stop on.
23 #[serde(rename = "eventName")]
24 pub event_name: String,
25}
26
27impl crate::typed::Command for SetInstrumentationBreakpointParams {
28 const METHOD: &'static str = "EventBreakpoints.setInstrumentationBreakpoint";
29 type Returns = crate::typed::NoReturns;
30}
31
32/// Removes breakpoint on particular native event.
33///
34/// Parameters of `EventBreakpoints.removeInstrumentationBreakpoint`.
35#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
36pub struct RemoveInstrumentationBreakpointParams {
37 /// Instrumentation name to stop on.
38 #[serde(rename = "eventName")]
39 pub event_name: String,
40}
41
42impl crate::typed::Command for RemoveInstrumentationBreakpointParams {
43 const METHOD: &'static str = "EventBreakpoints.removeInstrumentationBreakpoint";
44 type Returns = crate::typed::NoReturns;
45}
46
47/// Removes all breakpoints
48///
49/// Parameters of `EventBreakpoints.disable`.
50#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
51pub struct DisableParams {}
52
53impl crate::typed::Command for DisableParams {
54 const METHOD: &'static str = "EventBreakpoints.disable";
55 type Returns = crate::typed::NoReturns;
56}