1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
// @generated by `just generate-methods` from protocol/*.json.
// Do not edit by hand; edit xtask/ and regenerate.
//! Debugger domain exposes JavaScript debugging capabilities. It allows
//! setting and removing breakpoints, stepping through execution, exploring
//! stack traces, etc.
//!
//! Method names for the `Debugger` domain, for use with
//! [`CdpClient::call`](crate::CdpClient::call).
/// Continues execution until specific location is reached.
///
/// Parameters:
/// - `location`: Location
/// - `targetCallFrames`: string (optional)
pub const CONTINUE_TO_LOCATION: &str = "Debugger.continueToLocation";
/// Disables debugger for given page.
pub const DISABLE: &str = "Debugger.disable";
/// Enables debugger for the given page. Clients should not assume that the
/// debugging has been enabled until the result for this command is received.
///
/// Parameters:
/// - `maxScriptsCacheSize`: number (optional)
///
/// Returns: `debuggerId`
pub const ENABLE: &str = "Debugger.enable";
/// Evaluates expression on a given call frame.
///
/// Parameters:
/// - `callFrameId`: CallFrameId
/// - `expression`: string
/// - `objectGroup`: string (optional)
/// - `includeCommandLineAPI`: boolean (optional)
/// - `silent`: boolean (optional)
/// - `returnByValue`: boolean (optional)
/// - `generatePreview`: boolean (optional)
/// - `throwOnSideEffect`: boolean (optional)
/// - `timeout`: Runtime.TimeDelta (optional)
/// - `scopeNumber`: integer (optional)
///
/// Returns: `result`, `exceptionDetails`
pub const EVALUATE_ON_CALL_FRAME: &str = "Debugger.evaluateOnCallFrame";
/// Returns possible locations for breakpoint. scriptId in start and end range
/// locations should be the same.
///
/// Parameters:
/// - `start`: Location
/// - `end`: Location (optional)
/// - `restrictToFunction`: boolean (optional)
///
/// Returns: `locations`
pub const GET_POSSIBLE_BREAKPOINTS: &str = "Debugger.getPossibleBreakpoints";
/// Returns source for the script with given id.
///
/// Parameters:
/// - `scriptId`: Runtime.ScriptId
///
/// Returns: `scriptSource`, `bytecode`
pub const GET_SCRIPT_SOURCE: &str = "Debugger.getScriptSource";
/// `Debugger.disassembleWasmModule`
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `scriptId`: Runtime.ScriptId
///
/// Returns: `streamId`, `totalNumberOfLines`, `functionBodyOffsets`, `chunk`
pub const DISASSEMBLE_WASM_MODULE: &str = "Debugger.disassembleWasmModule";
/// 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.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `streamId`: string
///
/// Returns: `chunk`
pub const NEXT_WASM_DISASSEMBLY_CHUNK: &str = "Debugger.nextWasmDisassemblyChunk";
/// This command is deprecated. Use getScriptSource instead.
///
/// Deprecated in the protocol.
///
/// Parameters:
/// - `scriptId`: Runtime.ScriptId
///
/// Returns: `bytecode`
pub const GET_WASM_BYTECODE: &str = "Debugger.getWasmBytecode";
/// Returns stack trace with given `stackTraceId`.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `stackTraceId`: Runtime.StackTraceId
///
/// Returns: `stackTrace`
pub const GET_STACK_TRACE: &str = "Debugger.getStackTrace";
/// Stops on the next JavaScript statement.
pub const PAUSE: &str = "Debugger.pause";
/// `Debugger.pauseOnAsyncCall`
///
/// Deprecated in the protocol.
/// Experimental: may change without notice.
///
/// Parameters:
/// - `parentStackTraceId`: Runtime.StackTraceId
pub const PAUSE_ON_ASYNC_CALL: &str = "Debugger.pauseOnAsyncCall";
/// Removes JavaScript breakpoint.
///
/// Parameters:
/// - `breakpointId`: BreakpointId
pub const REMOVE_BREAKPOINT: &str = "Debugger.removeBreakpoint";
/// 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.
///
/// Parameters:
/// - `callFrameId`: CallFrameId
/// - `mode`: string (optional)
///
/// Returns: `callFrames`, `asyncStackTrace`, `asyncStackTraceId`
pub const RESTART_FRAME: &str = "Debugger.restartFrame";
/// Resumes JavaScript execution.
///
/// Parameters:
/// - `terminateOnResume`: boolean (optional)
pub const RESUME: &str = "Debugger.resume";
/// Searches for given string in script content.
///
/// Parameters:
/// - `scriptId`: Runtime.ScriptId
/// - `query`: string
/// - `caseSensitive`: boolean (optional)
/// - `isRegex`: boolean (optional)
///
/// Returns: `result`
pub const SEARCH_IN_CONTENT: &str = "Debugger.searchInContent";
/// Enables or disables async call stacks tracking.
///
/// Parameters:
/// - `maxDepth`: integer
pub const SET_ASYNC_CALL_STACK_DEPTH: &str = "Debugger.setAsyncCallStackDepth";
/// 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.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `uniqueIds`: array
pub const SET_BLACKBOX_EXECUTION_CONTEXTS: &str = "Debugger.setBlackboxExecutionContexts";
/// 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.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `patterns`: array
/// - `skipAnonymous`: boolean (optional)
pub const SET_BLACKBOX_PATTERNS: &str = "Debugger.setBlackboxPatterns";
/// 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.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `scriptId`: Runtime.ScriptId
/// - `positions`: array
pub const SET_BLACKBOXED_RANGES: &str = "Debugger.setBlackboxedRanges";
/// Sets JavaScript breakpoint at a given location.
///
/// Parameters:
/// - `location`: Location
/// - `condition`: string (optional)
///
/// Returns: `breakpointId`, `actualLocation`
pub const SET_BREAKPOINT: &str = "Debugger.setBreakpoint";
/// Sets instrumentation breakpoint.
///
/// Parameters:
/// - `instrumentation`: string
///
/// Returns: `breakpointId`
pub const SET_INSTRUMENTATION_BREAKPOINT: &str = "Debugger.setInstrumentationBreakpoint";
/// 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.
///
/// Parameters:
/// - `lineNumber`: integer
/// - `url`: string (optional)
/// - `urlRegex`: string (optional)
/// - `scriptHash`: string (optional)
/// - `columnNumber`: integer (optional)
/// - `condition`: string (optional)
///
/// Returns: `breakpointId`, `locations`
pub const SET_BREAKPOINT_BY_URL: &str = "Debugger.setBreakpointByUrl";
/// 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.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `objectId`: Runtime.RemoteObjectId
/// - `condition`: string (optional)
///
/// Returns: `breakpointId`
pub const SET_BREAKPOINT_ON_FUNCTION_CALL: &str = "Debugger.setBreakpointOnFunctionCall";
/// Activates / deactivates all breakpoints on the page.
///
/// Parameters:
/// - `active`: boolean
pub const SET_BREAKPOINTS_ACTIVE: &str = "Debugger.setBreakpointsActive";
/// 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`.
///
/// Parameters:
/// - `state`: string
pub const SET_PAUSE_ON_EXCEPTIONS: &str = "Debugger.setPauseOnExceptions";
/// Changes return value in top frame. Available only at return break
/// position.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `newValue`: Runtime.CallArgument
pub const SET_RETURN_VALUE: &str = "Debugger.setReturnValue";
/// Live edit is no longer supported and this command always fails with a "no
/// longer available" error.
///
/// Deprecated in the protocol.
///
/// Parameters:
/// - `scriptId`: Runtime.ScriptId
/// - `scriptSource`: string
/// - `dryRun`: boolean (optional)
/// - `allowTopFrameEditing`: boolean (optional)
///
/// Returns: `callFrames`, `stackChanged`, `asyncStackTrace`, `asyncStackTraceId`, `status`, `exceptionDetails`
pub const SET_SCRIPT_SOURCE: &str = "Debugger.setScriptSource";
/// Makes page not interrupt on any pauses (breakpoint, exception, dom
/// exception etc).
///
/// Parameters:
/// - `skip`: boolean
pub const SET_SKIP_ALL_PAUSES: &str = "Debugger.setSkipAllPauses";
/// Changes value of variable in a callframe. Object-based scopes are not
/// supported and must be mutated manually.
///
/// Parameters:
/// - `scopeNumber`: integer
/// - `variableName`: string
/// - `newValue`: Runtime.CallArgument
/// - `callFrameId`: CallFrameId
pub const SET_VARIABLE_VALUE: &str = "Debugger.setVariableValue";
/// Steps into the function call.
///
/// Parameters:
/// - `breakOnAsyncCall`: boolean (optional)
/// - `skipList`: array (optional)
pub const STEP_INTO: &str = "Debugger.stepInto";
/// Steps out of the function call.
pub const STEP_OUT: &str = "Debugger.stepOut";
/// Steps over the statement.
///
/// Parameters:
/// - `skipList`: array (optional)
/// - `enterRanges`: array (optional)
pub const STEP_OVER: &str = "Debugger.stepOver";