1use serde::{Deserialize, Serialize};
13
14pub type BreakpointId = String;
16
17pub type CallFrameId = String;
19
20#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
22pub struct Location {
23 #[serde(rename = "scriptId")]
25 pub script_id: crate::protocol::runtime::ScriptId,
26 #[serde(rename = "lineNumber")]
28 pub line_number: i64,
29 #[serde(
31 rename = "columnNumber",
32 default,
33 skip_serializing_if = "Option::is_none"
34 )]
35 pub column_number: Option<i64>,
36}
37
38#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
42pub struct ScriptPosition {
43 #[serde(rename = "lineNumber")]
44 pub line_number: i64,
45 #[serde(rename = "columnNumber")]
46 pub column_number: i64,
47}
48
49#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
53pub struct LocationRange {
54 #[serde(rename = "scriptId")]
55 pub script_id: crate::protocol::runtime::ScriptId,
56 pub start: ScriptPosition,
57 pub end: ScriptPosition,
58}
59
60#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
62pub struct CallFrame {
63 #[serde(rename = "callFrameId")]
66 pub call_frame_id: CallFrameId,
67 #[serde(rename = "functionName")]
69 pub function_name: String,
70 #[serde(
72 rename = "functionLocation",
73 default,
74 skip_serializing_if = "Option::is_none"
75 )]
76 pub function_location: Option<Location>,
77 pub location: Location,
79 pub url: String,
85 #[serde(rename = "scopeChain")]
87 pub scope_chain: Vec<Scope>,
88 pub this: crate::protocol::runtime::RemoteObject,
90 #[serde(
92 rename = "returnValue",
93 default,
94 skip_serializing_if = "Option::is_none"
95 )]
96 pub return_value: Option<crate::protocol::runtime::RemoteObject>,
97 #[serde(
104 rename = "canBeRestarted",
105 default,
106 skip_serializing_if = "Option::is_none"
107 )]
108 pub can_be_restarted: Option<bool>,
109}
110
111#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
113pub struct Scope {
114 pub r#type: ScopeType,
116 pub object: crate::protocol::runtime::RemoteObject,
120 #[serde(default, skip_serializing_if = "Option::is_none")]
121 pub name: Option<String>,
122 #[serde(
124 rename = "startLocation",
125 default,
126 skip_serializing_if = "Option::is_none"
127 )]
128 pub start_location: Option<Location>,
129 #[serde(
131 rename = "endLocation",
132 default,
133 skip_serializing_if = "Option::is_none"
134 )]
135 pub end_location: Option<Location>,
136 #[serde(
144 rename = "emptyReason",
145 default,
146 skip_serializing_if = "Option::is_none"
147 )]
148 pub empty_reason: Option<ScopeEmptyReason>,
149}
150
151#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
153pub enum ScopeType {
154 #[serde(rename = "global")]
156 Global,
157 #[serde(rename = "local")]
159 Local,
160 #[serde(rename = "with")]
162 With,
163 #[serde(rename = "closure")]
165 Closure,
166 #[serde(rename = "catch")]
168 Catch,
169 #[serde(rename = "block")]
171 Block,
172 #[serde(rename = "script")]
174 Script,
175 #[serde(rename = "eval")]
177 Eval,
178 #[serde(rename = "module")]
180 Module,
181 #[serde(rename = "wasm-expression-stack")]
183 WasmExpressionStack,
184 #[serde(untagged)]
188 Unrecognized(String),
189}
190
191#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
193pub enum ScopeEmptyReason {
194 #[serde(rename = "no-variables")]
196 NoVariables,
197 #[serde(rename = "all-unavailable")]
199 AllUnavailable,
200 #[serde(untagged)]
204 Unrecognized(String),
205}
206
207#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
209pub struct SearchMatch {
210 #[serde(rename = "lineNumber")]
212 pub line_number: f64,
213 #[serde(rename = "lineContent")]
215 pub line_content: String,
216}
217
218#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
219pub struct BreakLocation {
220 #[serde(rename = "scriptId")]
222 pub script_id: crate::protocol::runtime::ScriptId,
223 #[serde(rename = "lineNumber")]
225 pub line_number: i64,
226 #[serde(
228 rename = "columnNumber",
229 default,
230 skip_serializing_if = "Option::is_none"
231 )]
232 pub column_number: Option<i64>,
233 #[serde(default, skip_serializing_if = "Option::is_none")]
234 pub r#type: Option<BreakLocationType>,
235}
236
237#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
239pub enum BreakLocationType {
240 #[serde(rename = "debuggerStatement")]
242 DebuggerStatement,
243 #[serde(rename = "call")]
245 Call,
246 #[serde(rename = "return")]
248 Return,
249 #[serde(untagged)]
253 Unrecognized(String),
254}
255
256#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
258pub struct WasmDisassemblyChunk {
259 pub lines: Vec<String>,
261 #[serde(rename = "bytecodeOffsets")]
263 pub bytecode_offsets: Vec<i64>,
264}
265
266#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
268pub enum ScriptLanguage {
269 JavaScript,
271 WebAssembly,
273 #[serde(untagged)]
277 Unrecognized(String),
278}
279
280#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
282pub struct DebugSymbols {
283 pub r#type: DebugSymbolsType,
285 #[serde(
287 rename = "externalURL",
288 default,
289 skip_serializing_if = "Option::is_none"
290 )]
291 pub external_url: Option<String>,
292}
293
294#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
296pub enum DebugSymbolsType {
297 SourceMap,
299 #[serde(rename = "EmbeddedDWARF")]
301 EmbeddedDwarf,
302 #[serde(rename = "ExternalDWARF")]
304 ExternalDwarf,
305 #[serde(untagged)]
309 Unrecognized(String),
310}
311
312#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
313pub struct ResolvedBreakpoint {
314 #[serde(rename = "breakpointId")]
316 pub breakpoint_id: BreakpointId,
317 pub location: Location,
319}
320
321#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
325pub struct ContinueToLocationParams {
326 pub location: Location,
328 #[serde(
329 rename = "targetCallFrames",
330 default,
331 skip_serializing_if = "Option::is_none"
332 )]
333 pub target_call_frames: Option<ContinueToLocationTargetCallFrames>,
334}
335
336#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
338pub enum ContinueToLocationTargetCallFrames {
339 #[serde(rename = "any")]
341 Any,
342 #[serde(rename = "current")]
344 Current,
345 #[serde(untagged)]
349 Unrecognized(String),
350}
351
352impl crate::typed::Command for ContinueToLocationParams {
353 const METHOD: &'static str = "Debugger.continueToLocation";
354 type Returns = crate::typed::NoReturns;
355}
356
357#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
361pub struct DisableParams {}
362
363impl crate::typed::Command for DisableParams {
364 const METHOD: &'static str = "Debugger.disable";
365 type Returns = crate::typed::NoReturns;
366}
367
368#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
373pub struct EnableParams {
374 #[serde(
380 rename = "maxScriptsCacheSize",
381 default,
382 skip_serializing_if = "Option::is_none"
383 )]
384 pub max_scripts_cache_size: Option<f64>,
385}
386
387#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
389pub struct EnableReturns {
390 #[serde(rename = "debuggerId")]
394 pub debugger_id: crate::protocol::runtime::UniqueDebuggerId,
395}
396
397impl crate::typed::Command for EnableParams {
398 const METHOD: &'static str = "Debugger.enable";
399 type Returns = EnableReturns;
400}
401
402#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
406pub struct EvaluateOnCallFrameParams {
407 #[serde(rename = "callFrameId")]
409 pub call_frame_id: CallFrameId,
410 pub expression: String,
412 #[serde(
415 rename = "objectGroup",
416 default,
417 skip_serializing_if = "Option::is_none"
418 )]
419 pub object_group: Option<String>,
420 #[serde(
423 rename = "includeCommandLineAPI",
424 default,
425 skip_serializing_if = "Option::is_none"
426 )]
427 pub include_command_line_api: Option<bool>,
428 #[serde(default, skip_serializing_if = "Option::is_none")]
431 pub silent: Option<bool>,
432 #[serde(
435 rename = "returnByValue",
436 default,
437 skip_serializing_if = "Option::is_none"
438 )]
439 pub return_by_value: Option<bool>,
440 #[serde(
444 rename = "generatePreview",
445 default,
446 skip_serializing_if = "Option::is_none"
447 )]
448 pub generate_preview: Option<bool>,
449 #[serde(
452 rename = "throwOnSideEffect",
453 default,
454 skip_serializing_if = "Option::is_none"
455 )]
456 pub throw_on_side_effect: Option<bool>,
457 #[serde(default, skip_serializing_if = "Option::is_none")]
461 pub timeout: Option<crate::protocol::runtime::TimeDelta>,
462 #[serde(
467 rename = "scopeNumber",
468 default,
469 skip_serializing_if = "Option::is_none"
470 )]
471 pub scope_number: Option<i64>,
472}
473
474#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
476pub struct EvaluateOnCallFrameReturns {
477 pub result: crate::protocol::runtime::RemoteObject,
479 #[serde(
481 rename = "exceptionDetails",
482 default,
483 skip_serializing_if = "Option::is_none"
484 )]
485 pub exception_details: Option<crate::protocol::runtime::ExceptionDetails>,
486}
487
488impl crate::typed::Command for EvaluateOnCallFrameParams {
489 const METHOD: &'static str = "Debugger.evaluateOnCallFrame";
490 type Returns = EvaluateOnCallFrameReturns;
491}
492
493#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
498pub struct GetPossibleBreakpointsParams {
499 pub start: Location,
501 #[serde(default, skip_serializing_if = "Option::is_none")]
504 pub end: Option<Location>,
505 #[serde(
508 rename = "restrictToFunction",
509 default,
510 skip_serializing_if = "Option::is_none"
511 )]
512 pub restrict_to_function: Option<bool>,
513}
514
515#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
517pub struct GetPossibleBreakpointsReturns {
518 pub locations: Vec<BreakLocation>,
520}
521
522impl crate::typed::Command for GetPossibleBreakpointsParams {
523 const METHOD: &'static str = "Debugger.getPossibleBreakpoints";
524 type Returns = GetPossibleBreakpointsReturns;
525}
526
527#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
531pub struct GetScriptSourceParams {
532 #[serde(rename = "scriptId")]
534 pub script_id: crate::protocol::runtime::ScriptId,
535}
536
537#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
539pub struct GetScriptSourceReturns {
540 #[serde(rename = "scriptSource")]
542 pub script_source: String,
543 #[serde(default, skip_serializing_if = "Option::is_none")]
545 pub bytecode: Option<String>,
546}
547
548impl crate::typed::Command for GetScriptSourceParams {
549 const METHOD: &'static str = "Debugger.getScriptSource";
550 type Returns = GetScriptSourceReturns;
551}
552
553#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
557pub struct DisassembleWasmModuleParams {
558 #[serde(rename = "scriptId")]
560 pub script_id: crate::protocol::runtime::ScriptId,
561}
562
563#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
565pub struct DisassembleWasmModuleReturns {
566 #[serde(rename = "streamId", default, skip_serializing_if = "Option::is_none")]
569 pub stream_id: Option<String>,
570 #[serde(rename = "totalNumberOfLines")]
572 pub total_number_of_lines: i64,
573 #[serde(rename = "functionBodyOffsets")]
576 pub function_body_offsets: Vec<i64>,
577 pub chunk: WasmDisassemblyChunk,
579}
580
581impl crate::typed::Command for DisassembleWasmModuleParams {
582 const METHOD: &'static str = "Debugger.disassembleWasmModule";
583 type Returns = DisassembleWasmModuleReturns;
584}
585
586#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
595pub struct NextWasmDisassemblyChunkParams {
596 #[serde(rename = "streamId")]
597 pub stream_id: String,
598}
599
600#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
602pub struct NextWasmDisassemblyChunkReturns {
603 pub chunk: WasmDisassemblyChunk,
605}
606
607impl crate::typed::Command for NextWasmDisassemblyChunkParams {
608 const METHOD: &'static str = "Debugger.nextWasmDisassemblyChunk";
609 type Returns = NextWasmDisassemblyChunkReturns;
610}
611
612#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
618pub struct GetWasmBytecodeParams {
619 #[serde(rename = "scriptId")]
621 pub script_id: crate::protocol::runtime::ScriptId,
622}
623
624#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
626pub struct GetWasmBytecodeReturns {
627 pub bytecode: String,
629}
630
631impl crate::typed::Command for GetWasmBytecodeParams {
632 const METHOD: &'static str = "Debugger.getWasmBytecode";
633 type Returns = GetWasmBytecodeReturns;
634}
635
636#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
642pub struct GetStackTraceParams {
643 #[serde(rename = "stackTraceId")]
644 pub stack_trace_id: crate::protocol::runtime::StackTraceId,
645}
646
647#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
649pub struct GetStackTraceReturns {
650 #[serde(rename = "stackTrace")]
651 pub stack_trace: crate::protocol::runtime::StackTrace,
652}
653
654impl crate::typed::Command for GetStackTraceParams {
655 const METHOD: &'static str = "Debugger.getStackTrace";
656 type Returns = GetStackTraceReturns;
657}
658
659#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
663pub struct PauseParams {}
664
665impl crate::typed::Command for PauseParams {
666 const METHOD: &'static str = "Debugger.pause";
667 type Returns = crate::typed::NoReturns;
668}
669
670#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
676pub struct PauseOnAsyncCallParams {
677 #[serde(rename = "parentStackTraceId")]
679 pub parent_stack_trace_id: crate::protocol::runtime::StackTraceId,
680}
681
682impl crate::typed::Command for PauseOnAsyncCallParams {
683 const METHOD: &'static str = "Debugger.pauseOnAsyncCall";
684 type Returns = crate::typed::NoReturns;
685}
686
687#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
691pub struct RemoveBreakpointParams {
692 #[serde(rename = "breakpointId")]
693 pub breakpoint_id: BreakpointId,
694}
695
696impl crate::typed::Command for RemoveBreakpointParams {
697 const METHOD: &'static str = "Debugger.removeBreakpoint";
698 type Returns = crate::typed::NoReturns;
699}
700
701#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
714pub struct RestartFrameParams {
715 #[serde(rename = "callFrameId")]
717 pub call_frame_id: CallFrameId,
718 #[serde(default, skip_serializing_if = "Option::is_none")]
723 pub mode: Option<RestartFrameMode>,
724}
725
726#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
728pub enum RestartFrameMode {
729 StepInto,
731 #[serde(untagged)]
735 Unrecognized(String),
736}
737
738#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
740pub struct RestartFrameReturns {
741 #[serde(rename = "callFrames")]
745 pub call_frames: Vec<CallFrame>,
746 #[serde(
750 rename = "asyncStackTrace",
751 default,
752 skip_serializing_if = "Option::is_none"
753 )]
754 pub async_stack_trace: Option<crate::protocol::runtime::StackTrace>,
755 #[serde(
759 rename = "asyncStackTraceId",
760 default,
761 skip_serializing_if = "Option::is_none"
762 )]
763 pub async_stack_trace_id: Option<crate::protocol::runtime::StackTraceId>,
764}
765
766impl crate::typed::Command for RestartFrameParams {
767 const METHOD: &'static str = "Debugger.restartFrame";
768 type Returns = RestartFrameReturns;
769}
770
771#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
775pub struct ResumeParams {
776 #[serde(
782 rename = "terminateOnResume",
783 default,
784 skip_serializing_if = "Option::is_none"
785 )]
786 pub terminate_on_resume: Option<bool>,
787}
788
789impl crate::typed::Command for ResumeParams {
790 const METHOD: &'static str = "Debugger.resume";
791 type Returns = crate::typed::NoReturns;
792}
793
794#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
798pub struct SearchInContentParams {
799 #[serde(rename = "scriptId")]
801 pub script_id: crate::protocol::runtime::ScriptId,
802 pub query: String,
804 #[serde(
806 rename = "caseSensitive",
807 default,
808 skip_serializing_if = "Option::is_none"
809 )]
810 pub case_sensitive: Option<bool>,
811 #[serde(rename = "isRegex", default, skip_serializing_if = "Option::is_none")]
813 pub is_regex: Option<bool>,
814}
815
816#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
818pub struct SearchInContentReturns {
819 pub result: Vec<SearchMatch>,
821}
822
823impl crate::typed::Command for SearchInContentParams {
824 const METHOD: &'static str = "Debugger.searchInContent";
825 type Returns = SearchInContentReturns;
826}
827
828#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
832pub struct SetAsyncCallStackDepthParams {
833 #[serde(rename = "maxDepth")]
836 pub max_depth: i64,
837}
838
839impl crate::typed::Command for SetAsyncCallStackDepthParams {
840 const METHOD: &'static str = "Debugger.setAsyncCallStackDepth";
841 type Returns = crate::typed::NoReturns;
842}
843
844#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
853pub struct SetBlackboxExecutionContextsParams {
854 #[serde(rename = "uniqueIds")]
856 pub unique_ids: Vec<String>,
857}
858
859impl crate::typed::Command for SetBlackboxExecutionContextsParams {
860 const METHOD: &'static str = "Debugger.setBlackboxExecutionContexts";
861 type Returns = crate::typed::NoReturns;
862}
863
864#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
873pub struct SetBlackboxPatternsParams {
874 pub patterns: Vec<String>,
876 #[serde(
878 rename = "skipAnonymous",
879 default,
880 skip_serializing_if = "Option::is_none"
881 )]
882 pub skip_anonymous: Option<bool>,
883}
884
885impl crate::typed::Command for SetBlackboxPatternsParams {
886 const METHOD: &'static str = "Debugger.setBlackboxPatterns";
887 type Returns = crate::typed::NoReturns;
888}
889
890#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
900pub struct SetBlackboxedRangesParams {
901 #[serde(rename = "scriptId")]
903 pub script_id: crate::protocol::runtime::ScriptId,
904 pub positions: Vec<ScriptPosition>,
905}
906
907impl crate::typed::Command for SetBlackboxedRangesParams {
908 const METHOD: &'static str = "Debugger.setBlackboxedRanges";
909 type Returns = crate::typed::NoReturns;
910}
911
912#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
916pub struct SetBreakpointParams {
917 pub location: Location,
919 #[serde(default, skip_serializing_if = "Option::is_none")]
922 pub condition: Option<String>,
923}
924
925#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
927pub struct SetBreakpointReturns {
928 #[serde(rename = "breakpointId")]
930 pub breakpoint_id: BreakpointId,
931 #[serde(rename = "actualLocation")]
933 pub actual_location: Location,
934}
935
936impl crate::typed::Command for SetBreakpointParams {
937 const METHOD: &'static str = "Debugger.setBreakpoint";
938 type Returns = SetBreakpointReturns;
939}
940
941#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
945pub struct SetInstrumentationBreakpointParams {
946 pub instrumentation: SetInstrumentationBreakpointInstrumentation,
948}
949
950#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
952pub enum SetInstrumentationBreakpointInstrumentation {
953 #[serde(rename = "beforeScriptExecution")]
955 BeforeScriptExecution,
956 #[serde(rename = "beforeScriptWithSourceMapExecution")]
958 BeforeScriptWithSourceMapExecution,
959 #[serde(untagged)]
963 Unrecognized(String),
964}
965
966#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
968pub struct SetInstrumentationBreakpointReturns {
969 #[serde(rename = "breakpointId")]
971 pub breakpoint_id: BreakpointId,
972}
973
974impl crate::typed::Command for SetInstrumentationBreakpointParams {
975 const METHOD: &'static str = "Debugger.setInstrumentationBreakpoint";
976 type Returns = SetInstrumentationBreakpointReturns;
977}
978
979#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
987pub struct SetBreakpointByUrlParams {
988 #[serde(rename = "lineNumber")]
990 pub line_number: i64,
991 #[serde(default, skip_serializing_if = "Option::is_none")]
993 pub url: Option<String>,
994 #[serde(rename = "urlRegex", default, skip_serializing_if = "Option::is_none")]
997 pub url_regex: Option<String>,
998 #[serde(
1000 rename = "scriptHash",
1001 default,
1002 skip_serializing_if = "Option::is_none"
1003 )]
1004 pub script_hash: Option<String>,
1005 #[serde(
1007 rename = "columnNumber",
1008 default,
1009 skip_serializing_if = "Option::is_none"
1010 )]
1011 pub column_number: Option<i64>,
1012 #[serde(default, skip_serializing_if = "Option::is_none")]
1015 pub condition: Option<String>,
1016}
1017
1018#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1020pub struct SetBreakpointByUrlReturns {
1021 #[serde(rename = "breakpointId")]
1023 pub breakpoint_id: BreakpointId,
1024 pub locations: Vec<Location>,
1026}
1027
1028impl crate::typed::Command for SetBreakpointByUrlParams {
1029 const METHOD: &'static str = "Debugger.setBreakpointByUrl";
1030 type Returns = SetBreakpointByUrlReturns;
1031}
1032
1033#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1041pub struct SetBreakpointOnFunctionCallParams {
1042 #[serde(rename = "objectId")]
1044 pub object_id: crate::protocol::runtime::RemoteObjectId,
1045 #[serde(default, skip_serializing_if = "Option::is_none")]
1048 pub condition: Option<String>,
1049}
1050
1051#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1053pub struct SetBreakpointOnFunctionCallReturns {
1054 #[serde(rename = "breakpointId")]
1056 pub breakpoint_id: BreakpointId,
1057}
1058
1059impl crate::typed::Command for SetBreakpointOnFunctionCallParams {
1060 const METHOD: &'static str = "Debugger.setBreakpointOnFunctionCall";
1061 type Returns = SetBreakpointOnFunctionCallReturns;
1062}
1063
1064#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1068pub struct SetBreakpointsActiveParams {
1069 pub active: bool,
1071}
1072
1073impl crate::typed::Command for SetBreakpointsActiveParams {
1074 const METHOD: &'static str = "Debugger.setBreakpointsActive";
1075 type Returns = crate::typed::NoReturns;
1076}
1077
1078#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1084pub struct SetPauseOnExceptionsParams {
1085 pub state: SetPauseOnExceptionsState,
1087}
1088
1089#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1091pub enum SetPauseOnExceptionsState {
1092 #[serde(rename = "none")]
1094 None,
1095 #[serde(rename = "caught")]
1097 Caught,
1098 #[serde(rename = "uncaught")]
1100 Uncaught,
1101 #[serde(rename = "all")]
1103 All,
1104 #[serde(untagged)]
1108 Unrecognized(String),
1109}
1110
1111impl crate::typed::Command for SetPauseOnExceptionsParams {
1112 const METHOD: &'static str = "Debugger.setPauseOnExceptions";
1113 type Returns = crate::typed::NoReturns;
1114}
1115
1116#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1123pub struct SetReturnValueParams {
1124 #[serde(rename = "newValue")]
1126 pub new_value: crate::protocol::runtime::CallArgument,
1127}
1128
1129impl crate::typed::Command for SetReturnValueParams {
1130 const METHOD: &'static str = "Debugger.setReturnValue";
1131 type Returns = crate::typed::NoReturns;
1132}
1133
1134#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1141pub struct SetScriptSourceParams {
1142 #[serde(rename = "scriptId")]
1144 pub script_id: crate::protocol::runtime::ScriptId,
1145 #[serde(rename = "scriptSource")]
1147 pub script_source: String,
1148 #[serde(rename = "dryRun", default, skip_serializing_if = "Option::is_none")]
1151 pub dry_run: Option<bool>,
1152 #[serde(
1158 rename = "allowTopFrameEditing",
1159 default,
1160 skip_serializing_if = "Option::is_none"
1161 )]
1162 pub allow_top_frame_editing: Option<bool>,
1163}
1164
1165#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1167pub struct SetScriptSourceReturns {
1168 #[serde(
1172 rename = "callFrames",
1173 default,
1174 skip_serializing_if = "Option::is_none"
1175 )]
1176 pub call_frames: Option<Vec<CallFrame>>,
1177 #[serde(
1181 rename = "stackChanged",
1182 default,
1183 skip_serializing_if = "Option::is_none"
1184 )]
1185 pub stack_changed: Option<bool>,
1186 #[serde(
1190 rename = "asyncStackTrace",
1191 default,
1192 skip_serializing_if = "Option::is_none"
1193 )]
1194 pub async_stack_trace: Option<crate::protocol::runtime::StackTrace>,
1195 #[serde(
1199 rename = "asyncStackTraceId",
1200 default,
1201 skip_serializing_if = "Option::is_none"
1202 )]
1203 pub async_stack_trace_id: Option<crate::protocol::runtime::StackTraceId>,
1204 pub status: SetScriptSourceStatus,
1210 #[serde(
1212 rename = "exceptionDetails",
1213 default,
1214 skip_serializing_if = "Option::is_none"
1215 )]
1216 pub exception_details: Option<crate::protocol::runtime::ExceptionDetails>,
1217}
1218
1219#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1221pub enum SetScriptSourceStatus {
1222 Ok,
1224 CompileError,
1226 BlockedByActiveGenerator,
1228 BlockedByActiveFunction,
1230 BlockedByTopLevelEsModuleChange,
1232 #[serde(untagged)]
1236 Unrecognized(String),
1237}
1238
1239impl crate::typed::Command for SetScriptSourceParams {
1240 const METHOD: &'static str = "Debugger.setScriptSource";
1241 type Returns = SetScriptSourceReturns;
1242}
1243
1244#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1249pub struct SetSkipAllPausesParams {
1250 pub skip: bool,
1252}
1253
1254impl crate::typed::Command for SetSkipAllPausesParams {
1255 const METHOD: &'static str = "Debugger.setSkipAllPauses";
1256 type Returns = crate::typed::NoReturns;
1257}
1258
1259#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1264pub struct SetVariableValueParams {
1265 #[serde(rename = "scopeNumber")]
1269 pub scope_number: i64,
1270 #[serde(rename = "variableName")]
1272 pub variable_name: String,
1273 #[serde(rename = "newValue")]
1275 pub new_value: crate::protocol::runtime::CallArgument,
1276 #[serde(rename = "callFrameId")]
1278 pub call_frame_id: CallFrameId,
1279}
1280
1281impl crate::typed::Command for SetVariableValueParams {
1282 const METHOD: &'static str = "Debugger.setVariableValue";
1283 type Returns = crate::typed::NoReturns;
1284}
1285
1286#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1290pub struct StepIntoParams {
1291 #[serde(
1296 rename = "breakOnAsyncCall",
1297 default,
1298 skip_serializing_if = "Option::is_none"
1299 )]
1300 pub break_on_async_call: Option<bool>,
1301 #[serde(rename = "skipList", default, skip_serializing_if = "Option::is_none")]
1306 pub skip_list: Option<Vec<LocationRange>>,
1307}
1308
1309impl crate::typed::Command for StepIntoParams {
1310 const METHOD: &'static str = "Debugger.stepInto";
1311 type Returns = crate::typed::NoReturns;
1312}
1313
1314#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1318pub struct StepOutParams {}
1319
1320impl crate::typed::Command for StepOutParams {
1321 const METHOD: &'static str = "Debugger.stepOut";
1322 type Returns = crate::typed::NoReturns;
1323}
1324
1325#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1329pub struct StepOverParams {
1330 #[serde(rename = "skipList", default, skip_serializing_if = "Option::is_none")]
1335 pub skip_list: Option<Vec<LocationRange>>,
1336 #[serde(
1342 rename = "enterRanges",
1343 default,
1344 skip_serializing_if = "Option::is_none"
1345 )]
1346 pub enter_ranges: Option<Vec<LocationRange>>,
1347}
1348
1349impl crate::typed::Command for StepOverParams {
1350 const METHOD: &'static str = "Debugger.stepOver";
1351 type Returns = crate::typed::NoReturns;
1352}
1353
1354#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1361pub struct BreakpointResolvedEvent {
1362 #[serde(rename = "breakpointId")]
1364 pub breakpoint_id: BreakpointId,
1365 pub location: Location,
1367}
1368
1369impl crate::typed::Event for BreakpointResolvedEvent {
1370 const METHOD: &'static str = "Debugger.breakpointResolved";
1371}
1372
1373#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1378pub struct PausedEvent {
1379 #[serde(rename = "callFrames")]
1381 pub call_frames: Vec<CallFrame>,
1382 pub reason: PausedReason,
1384 #[serde(default, skip_serializing_if = "Option::is_none")]
1386 pub data: Option<serde_json::Value>,
1387 #[serde(
1389 rename = "hitBreakpoints",
1390 default,
1391 skip_serializing_if = "Option::is_none"
1392 )]
1393 pub hit_breakpoints: Option<Vec<String>>,
1394 #[serde(
1396 rename = "asyncStackTrace",
1397 default,
1398 skip_serializing_if = "Option::is_none"
1399 )]
1400 pub async_stack_trace: Option<crate::protocol::runtime::StackTrace>,
1401 #[serde(
1405 rename = "asyncStackTraceId",
1406 default,
1407 skip_serializing_if = "Option::is_none"
1408 )]
1409 pub async_stack_trace_id: Option<crate::protocol::runtime::StackTraceId>,
1410 #[serde(
1416 rename = "asyncCallStackTraceId",
1417 default,
1418 skip_serializing_if = "Option::is_none"
1419 )]
1420 pub async_call_stack_trace_id: Option<crate::protocol::runtime::StackTraceId>,
1421}
1422
1423#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1425pub enum PausedReason {
1426 #[serde(rename = "ambiguous")]
1428 Ambiguous,
1429 #[serde(rename = "assert")]
1431 Assert,
1432 #[serde(rename = "CSPViolation")]
1434 CspViolation,
1435 #[serde(rename = "debugCommand")]
1437 DebugCommand,
1438 #[serde(rename = "DOM")]
1440 Dom,
1441 EventListener,
1443 #[serde(rename = "exception")]
1445 Exception,
1446 #[serde(rename = "instrumentation")]
1448 Instrumentation,
1449 #[serde(rename = "OOM")]
1451 Oom,
1452 #[serde(rename = "other")]
1454 Other,
1455 #[serde(rename = "promiseRejection")]
1457 PromiseRejection,
1458 #[serde(rename = "XHR")]
1460 Xhr,
1461 #[serde(rename = "step")]
1463 Step,
1464 #[serde(untagged)]
1468 Unrecognized(String),
1469}
1470
1471impl crate::typed::Event for PausedEvent {
1472 const METHOD: &'static str = "Debugger.paused";
1473}
1474
1475#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1479pub struct ResumedEvent {}
1480
1481impl crate::typed::Event for ResumedEvent {
1482 const METHOD: &'static str = "Debugger.resumed";
1483}
1484
1485#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1489pub struct ScriptFailedToParseEvent {
1490 #[serde(rename = "scriptId")]
1492 pub script_id: crate::protocol::runtime::ScriptId,
1493 pub url: String,
1495 #[serde(rename = "startLine")]
1498 pub start_line: i64,
1499 #[serde(rename = "startColumn")]
1501 pub start_column: i64,
1502 #[serde(rename = "endLine")]
1504 pub end_line: i64,
1505 #[serde(rename = "endColumn")]
1507 pub end_column: i64,
1508 #[serde(rename = "executionContextId")]
1510 pub execution_context_id: crate::protocol::runtime::ExecutionContextId,
1511 pub hash: String,
1513 #[serde(rename = "buildId")]
1516 pub build_id: String,
1517 #[serde(
1520 rename = "executionContextAuxData",
1521 default,
1522 skip_serializing_if = "Option::is_none"
1523 )]
1524 pub execution_context_aux_data: Option<serde_json::Value>,
1525 #[serde(
1527 rename = "sourceMapURL",
1528 default,
1529 skip_serializing_if = "Option::is_none"
1530 )]
1531 pub source_map_url: Option<String>,
1532 #[serde(
1534 rename = "hasSourceURL",
1535 default,
1536 skip_serializing_if = "Option::is_none"
1537 )]
1538 pub has_source_url: Option<bool>,
1539 #[serde(rename = "isModule", default, skip_serializing_if = "Option::is_none")]
1541 pub is_module: Option<bool>,
1542 #[serde(default, skip_serializing_if = "Option::is_none")]
1544 pub length: Option<i64>,
1545 #[serde(
1550 rename = "stackTrace",
1551 default,
1552 skip_serializing_if = "Option::is_none"
1553 )]
1554 pub stack_trace: Option<crate::protocol::runtime::StackTrace>,
1555 #[serde(
1560 rename = "codeOffset",
1561 default,
1562 skip_serializing_if = "Option::is_none"
1563 )]
1564 pub code_offset: Option<i64>,
1565 #[serde(
1569 rename = "scriptLanguage",
1570 default,
1571 skip_serializing_if = "Option::is_none"
1572 )]
1573 pub script_language: Option<ScriptLanguage>,
1574 #[serde(
1578 rename = "embedderName",
1579 default,
1580 skip_serializing_if = "Option::is_none"
1581 )]
1582 pub embedder_name: Option<String>,
1583}
1584
1585impl crate::typed::Event for ScriptFailedToParseEvent {
1586 const METHOD: &'static str = "Debugger.scriptFailedToParse";
1587}
1588
1589#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1594pub struct ScriptParsedEvent {
1595 #[serde(rename = "scriptId")]
1597 pub script_id: crate::protocol::runtime::ScriptId,
1598 pub url: String,
1600 #[serde(rename = "startLine")]
1603 pub start_line: i64,
1604 #[serde(rename = "startColumn")]
1606 pub start_column: i64,
1607 #[serde(rename = "endLine")]
1609 pub end_line: i64,
1610 #[serde(rename = "endColumn")]
1612 pub end_column: i64,
1613 #[serde(rename = "executionContextId")]
1615 pub execution_context_id: crate::protocol::runtime::ExecutionContextId,
1616 pub hash: String,
1618 #[serde(rename = "buildId")]
1621 pub build_id: String,
1622 #[serde(
1625 rename = "executionContextAuxData",
1626 default,
1627 skip_serializing_if = "Option::is_none"
1628 )]
1629 pub execution_context_aux_data: Option<serde_json::Value>,
1630 #[serde(
1634 rename = "isLiveEdit",
1635 default,
1636 skip_serializing_if = "Option::is_none"
1637 )]
1638 pub is_live_edit: Option<bool>,
1639 #[serde(
1641 rename = "sourceMapURL",
1642 default,
1643 skip_serializing_if = "Option::is_none"
1644 )]
1645 pub source_map_url: Option<String>,
1646 #[serde(
1648 rename = "hasSourceURL",
1649 default,
1650 skip_serializing_if = "Option::is_none"
1651 )]
1652 pub has_source_url: Option<bool>,
1653 #[serde(rename = "isModule", default, skip_serializing_if = "Option::is_none")]
1655 pub is_module: Option<bool>,
1656 #[serde(default, skip_serializing_if = "Option::is_none")]
1658 pub length: Option<i64>,
1659 #[serde(
1664 rename = "stackTrace",
1665 default,
1666 skip_serializing_if = "Option::is_none"
1667 )]
1668 pub stack_trace: Option<crate::protocol::runtime::StackTrace>,
1669 #[serde(
1674 rename = "codeOffset",
1675 default,
1676 skip_serializing_if = "Option::is_none"
1677 )]
1678 pub code_offset: Option<i64>,
1679 #[serde(
1683 rename = "scriptLanguage",
1684 default,
1685 skip_serializing_if = "Option::is_none"
1686 )]
1687 pub script_language: Option<ScriptLanguage>,
1688 #[serde(
1693 rename = "debugSymbols",
1694 default,
1695 skip_serializing_if = "Option::is_none"
1696 )]
1697 pub debug_symbols: Option<Vec<DebugSymbols>>,
1698 #[serde(
1702 rename = "embedderName",
1703 default,
1704 skip_serializing_if = "Option::is_none"
1705 )]
1706 pub embedder_name: Option<String>,
1707 #[serde(
1713 rename = "resolvedBreakpoints",
1714 default,
1715 skip_serializing_if = "Option::is_none"
1716 )]
1717 pub resolved_breakpoints: Option<Vec<ResolvedBreakpoint>>,
1718}
1719
1720impl crate::typed::Event for ScriptParsedEvent {
1721 const METHOD: &'static str = "Debugger.scriptParsed";
1722}