1# Copyright 2017 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5version
6  major 1
7  minor 3
8
9# This domain is deprecated - use Runtime or Log instead.
10deprecated domain Console
11  depends on Runtime
12
13  # Console message.
14  type ConsoleMessage extends object
15    properties
16      # Message source.
17      enum source
18        xml
19        javascript
20        network
21        console-api
22        storage
23        appcache
24        rendering
25        security
26        other
27        deprecation
28        worker
29      # Message severity.
30      enum level
31        log
32        warning
33        error
34        debug
35        info
36      # Message text.
37      string text
38      # URL of the message origin.
39      optional string url
40      # Line number in the resource that generated this message (1-based).
41      optional integer line
42      # Column number in the resource that generated this message (1-based).
43      optional integer column
44
45  # Does nothing.
46  command clearMessages
47
48  # Disables console domain, prevents further console messages from being reported to the client.
49  command disable
50
51  # Enables console domain, sends the messages collected so far to the client by means of the
52  # `messageAdded` notification.
53  command enable
54
55  # Issued when new console message is added.
56  event messageAdded
57    parameters
58      # Console message that has been added.
59      ConsoleMessage message
60
61# Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing
62# breakpoints, stepping through execution, exploring stack traces, etc.
63domain Debugger
64  depends on Runtime
65
66  # Breakpoint identifier.
67  type BreakpointId extends string
68
69  # Call frame identifier.
70  type CallFrameId extends string
71
72  # Location in the source code.
73  type Location extends object
74    properties
75      # Script identifier as reported in the `Debugger.scriptParsed`.
76      Runtime.ScriptId scriptId
77      # Line number in the script (0-based).
78      integer lineNumber
79      # Column number in the script (0-based).
80      optional integer columnNumber
81
82  # Location in the source code.
83  experimental type ScriptPosition extends object
84    properties
85      integer lineNumber
86      integer columnNumber
87
88  # Location range within one script.
89  experimental type LocationRange extends object
90    properties
91      Runtime.ScriptId scriptId
92      ScriptPosition start
93      ScriptPosition end
94
95  # JavaScript call frame. Array of call frames form the call stack.
96  type CallFrame extends object
97    properties
98      # Call frame identifier. This identifier is only valid while the virtual machine is paused.
99      CallFrameId callFrameId
100      # Name of the JavaScript function called on this call frame.
101      string functionName
102      # Location in the source code.
103      optional Location functionLocation
104      # Location in the source code.
105      Location location
106      # JavaScript script name or url.
107      # Deprecated in favor of using the `location.scriptId` to resolve the URL via a previously
108      # sent `Debugger.scriptParsed` event.
109      deprecated string url
110      # Scope chain for this call frame.
111      array of Scope scopeChain
112      # `this` object for this call frame.
113      Runtime.RemoteObject this
114      # The value being returned, if the function is at return point.
115      optional Runtime.RemoteObject returnValue
116      # Valid only while the VM is paused and indicates whether this frame
117      # can be restarted or not. Note that a `true` value here does not
118      # guarantee that Debugger#restartFrame with this CallFrameId will be
119      # successful, but it is very likely.
120      experimental optional boolean canBeRestarted
121
122  # Scope description.
123  type Scope extends object
124    properties
125      # Scope type.
126      enum type
127        global
128        local
129        with
130        closure
131        catch
132        block
133        script
134        eval
135        module
136        wasm-expression-stack
137      # Object representing the scope. For `global` and `with` scopes it represents the actual
138      # object; for the rest of the scopes, it is artificial transient object enumerating scope
139      # variables as its properties.
140      Runtime.RemoteObject object
141      optional string name
142      # Location in the source code where scope starts
143      optional Location startLocation
144      # Location in the source code where scope ends
145      optional Location endLocation
146
147  # Search match for resource.
148  type SearchMatch extends object
149    properties
150      # Line number in resource content.
151      number lineNumber
152      # Line with match content.
153      string lineContent
154
155  type BreakLocation extends object
156    properties
157      # Script identifier as reported in the `Debugger.scriptParsed`.
158      Runtime.ScriptId scriptId
159      # Line number in the script (0-based).
160      integer lineNumber
161      # Column number in the script (0-based).
162      optional integer columnNumber
163      optional enum type
164        debuggerStatement
165        call
166        return
167
168  # Continues execution until specific location is reached.
169  command continueToLocation
170    parameters
171      # Location to continue to.
172      Location location
173      optional enum targetCallFrames
174        any
175        current
176
177  # Disables debugger for given page.
178  command disable
179
180  # Enables debugger for the given page. Clients should not assume that the debugging has been
181  # enabled until the result for this command is received.
182  command enable
183    parameters
184      # The maximum size in bytes of collected scripts (not referenced by other heap objects)
185      # the debugger can hold. Puts no limit if parameter is omitted.
186      experimental optional number maxScriptsCacheSize
187    returns
188      # Unique identifier of the debugger.
189      experimental Runtime.UniqueDebuggerId debuggerId
190
191  # Evaluates expression on a given call frame.
192  command evaluateOnCallFrame
193    parameters
194      # Call frame identifier to evaluate on.
195      CallFrameId callFrameId
196      # Expression to evaluate.
197      string expression
198      # String object group name to put result into (allows rapid releasing resulting object handles
199      # using `releaseObjectGroup`).
200      optional string objectGroup
201      # Specifies whether command line API should be available to the evaluated expression, defaults
202      # to false.
203      optional boolean includeCommandLineAPI
204      # In silent mode exceptions thrown during evaluation are not reported and do not pause
205      # execution. Overrides `setPauseOnException` state.
206      optional boolean silent
207      # Whether the result is expected to be a JSON object that should be sent by value.
208      optional boolean returnByValue
209      # Whether preview should be generated for the result.
210      experimental optional boolean generatePreview
211      # Whether to throw an exception if side effect cannot be ruled out during evaluation.
212      optional boolean throwOnSideEffect
213      # Terminate execution after timing out (number of milliseconds).
214      experimental optional Runtime.TimeDelta timeout
215    returns
216      # Object wrapper for the evaluation result.
217      Runtime.RemoteObject result
218      # Exception details.
219      optional Runtime.ExceptionDetails exceptionDetails
220
221  # Returns possible locations for breakpoint. scriptId in start and end range locations should be
222  # the same.
223  command getPossibleBreakpoints
224    parameters
225      # Start of range to search possible breakpoint locations in.
226      Location start
227      # End of range to search possible breakpoint locations in (excluding). When not specified, end
228      # of scripts is used as end of range.
229      optional Location end
230      # Only consider locations which are in the same (non-nested) function as start.
231      optional boolean restrictToFunction
232    returns
233      # List of the possible breakpoint locations.
234      array of BreakLocation locations
235
236  # Returns source for the script with given id.
237  command getScriptSource
238    parameters
239      # Id of the script to get source for.
240      Runtime.ScriptId scriptId
241    returns
242      # Script source (empty in case of Wasm bytecode).
243      string scriptSource
244      # Wasm bytecode.
245      optional binary bytecode
246
247  experimental type WasmDisassemblyChunk extends object
248    properties
249      # The next chunk of disassembled lines.
250      array of string lines
251      # The bytecode offsets describing the start of each line.
252      array of integer bytecodeOffsets
253
254  experimental command disassembleWasmModule
255    parameters
256      # Id of the script to disassemble
257      Runtime.ScriptId scriptId
258    returns
259      # For large modules, return a stream from which additional chunks of
260      # disassembly can be read successively.
261      optional string streamId
262      # The total number of lines in the disassembly text.
263      integer totalNumberOfLines
264      # The offsets of all function bodies, in the format [start1, end1,
265      # start2, end2, ...] where all ends are exclusive.
266      array of integer functionBodyOffsets
267      # The first chunk of disassembly.
268      WasmDisassemblyChunk chunk
269
270  # Disassemble the next chunk of lines for the module corresponding to the
271  # stream. If disassembly is complete, this API will invalidate the streamId
272  # and return an empty chunk. Any subsequent calls for the now invalid stream
273  # will return errors.
274  experimental command nextWasmDisassemblyChunk
275    parameters
276      string streamId
277    returns
278      # The next chunk of disassembly.
279      WasmDisassemblyChunk chunk
280
281  # This command is deprecated. Use getScriptSource instead.
282  deprecated command getWasmBytecode
283    parameters
284      # Id of the Wasm script to get source for.
285      Runtime.ScriptId scriptId
286    returns
287      # Script source.
288      binary bytecode
289
290  # Returns stack trace with given `stackTraceId`.
291  experimental command getStackTrace
292    parameters
293      Runtime.StackTraceId stackTraceId
294    returns
295      Runtime.StackTrace stackTrace
296
297  # Stops on the next JavaScript statement.
298  command pause
299
300  experimental deprecated command pauseOnAsyncCall
301    parameters
302      # Debugger will pause when async call with given stack trace is started.
303      Runtime.StackTraceId parentStackTraceId
304
305  # Removes JavaScript breakpoint.
306  command removeBreakpoint
307    parameters
308      BreakpointId breakpointId
309
310  # Restarts particular call frame from the beginning. The old, deprecated
311  # behavior of `restartFrame` is to stay paused and allow further CDP commands
312  # after a restart was scheduled. This can cause problems with restarting, so
313  # we now continue execution immediatly after it has been scheduled until we
314  # reach the beginning of the restarted frame.
315  #
316  # To stay back-wards compatible, `restartFrame` now expects a `mode`
317  # parameter to be present. If the `mode` parameter is missing, `restartFrame`
318  # errors out.
319  #
320  # The various return values are deprecated and `callFrames` is always empty.
321  # Use the call frames from the `Debugger#paused` events instead, that fires
322  # once V8 pauses at the beginning of the restarted function.
323  command restartFrame
324    parameters
325      # Call frame identifier to evaluate on.
326      CallFrameId callFrameId
327      # The `mode` parameter must be present and set to 'StepInto', otherwise
328      # `restartFrame` will error out.
329      experimental optional enum mode
330        # Pause at the beginning of the restarted function
331        StepInto
332    returns
333      # New stack trace.
334      deprecated array of CallFrame callFrames
335      # Async stack trace, if any.
336      deprecated optional Runtime.StackTrace asyncStackTrace
337      # Async stack trace, if any.
338      deprecated optional Runtime.StackTraceId asyncStackTraceId
339
340  # Resumes JavaScript execution.
341  command resume
342    parameters
343      # Set to true to terminate execution upon resuming execution. In contrast
344      # to Runtime.terminateExecution, this will allows to execute further
345      # JavaScript (i.e. via evaluation) until execution of the paused code
346      # is actually resumed, at which point termination is triggered.
347      # If execution is currently not paused, this parameter has no effect.
348      optional boolean terminateOnResume
349
350  # Searches for given string in script content.
351  command searchInContent
352    parameters
353      # Id of the script to search in.
354      Runtime.ScriptId scriptId
355      # String to search for.
356      string query
357      # If true, search is case sensitive.
358      optional boolean caseSensitive
359      # If true, treats string parameter as regex.
360      optional boolean isRegex
361    returns
362      # List of search matches.
363      array of SearchMatch result
364
365  # Enables or disables async call stacks tracking.
366  command setAsyncCallStackDepth
367    parameters
368      # Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
369      # call stacks (default).
370      integer maxDepth
371
372  # Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
373  # scripts with url matching one of the patterns. VM will try to leave blackboxed script by
374  # performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
375  experimental command setBlackboxPatterns
376    parameters
377      # Array of regexps that will be used to check script url for blackbox state.
378      array of string patterns
379
380  # Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
381  # scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
382  # Positions array contains positions where blackbox state is changed. First interval isn't
383  # blackboxed. Array should be sorted.
384  experimental command setBlackboxedRanges
385    parameters
386      # Id of the script.
387      Runtime.ScriptId scriptId
388      array of ScriptPosition positions
389
390  # Sets JavaScript breakpoint at a given location.
391  command setBreakpoint
392    parameters
393      # Location to set breakpoint in.
394      Location location
395      # Expression to use as a breakpoint condition. When specified, debugger will only stop on the
396      # breakpoint if this expression evaluates to true.
397      optional string condition
398    returns
399      # Id of the created breakpoint for further reference.
400      BreakpointId breakpointId
401      # Location this breakpoint resolved into.
402      Location actualLocation
403
404  # Sets instrumentation breakpoint.
405  command setInstrumentationBreakpoint
406    parameters
407      # Instrumentation name.
408      enum instrumentation
409        beforeScriptExecution
410        beforeScriptWithSourceMapExecution
411    returns
412      # Id of the created breakpoint for further reference.
413      BreakpointId breakpointId
414
415  # Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
416  # command is issued, all existing parsed scripts will have breakpoints resolved and returned in
417  # `locations` property. Further matching script parsing will result in subsequent
418  # `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
419  command setBreakpointByUrl
420    parameters
421      # Line number to set breakpoint at.
422      integer lineNumber
423      # URL of the resources to set breakpoint on.
424      optional string url
425      # Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
426      # `urlRegex` must be specified.
427      optional string urlRegex
428      # Script hash of the resources to set breakpoint on.
429      optional string scriptHash
430      # Offset in the line to set breakpoint at.
431      optional integer columnNumber
432      # Expression to use as a breakpoint condition. When specified, debugger will only stop on the
433      # breakpoint if this expression evaluates to true.
434      optional string condition
435    returns
436      # Id of the created breakpoint for further reference.
437      BreakpointId breakpointId
438      # List of the locations this breakpoint resolved into upon addition.
439      array of Location locations
440
441  # Sets JavaScript breakpoint before each call to the given function.
442  # If another function was created from the same source as a given one,
443  # calling it will also trigger the breakpoint.
444  experimental command setBreakpointOnFunctionCall
445    parameters
446      # Function object id.
447      Runtime.RemoteObjectId objectId
448      # Expression to use as a breakpoint condition. When specified, debugger will
449      # stop on the breakpoint if this expression evaluates to true.
450      optional string condition
451    returns
452      # Id of the created breakpoint for further reference.
453      BreakpointId breakpointId
454
455  # Activates / deactivates all breakpoints on the page.
456  command setBreakpointsActive
457    parameters
458      # New value for breakpoints active state.
459      boolean active
460
461  # Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions,
462  # or caught exceptions, no exceptions. Initial pause on exceptions state is `none`.
463  command setPauseOnExceptions
464    parameters
465      # Pause on exceptions mode.
466      enum state
467        none
468        caught
469        uncaught
470        all
471
472  # Changes return value in top frame. Available only at return break position.
473  experimental command setReturnValue
474    parameters
475      # New return value.
476      Runtime.CallArgument newValue
477
478  # Edits JavaScript source live.
479  #
480  # In general, functions that are currently on the stack can not be edited with
481  # a single exception: If the edited function is the top-most stack frame and
482  # that is the only activation of that function on the stack. In this case
483  # the live edit will be successful and a `Debugger.restartFrame` for the
484  # top-most function is automatically triggered.
485  command setScriptSource
486    parameters
487      # Id of the script to edit.
488      Runtime.ScriptId scriptId
489      # New content of the script.
490      string scriptSource
491      #  If true the change will not actually be applied. Dry run may be used to get result
492      # description without actually modifying the code.
493      optional boolean dryRun
494      # If true, then `scriptSource` is allowed to change the function on top of the stack
495      # as long as the top-most stack frame is the only activation of that function.
496      experimental optional boolean allowTopFrameEditing
497    returns
498      # New stack trace in case editing has happened while VM was stopped.
499      deprecated optional array of CallFrame callFrames
500      # Whether current call stack  was modified after applying the changes.
501      deprecated optional boolean stackChanged
502      # Async stack trace, if any.
503      deprecated optional Runtime.StackTrace asyncStackTrace
504      # Async stack trace, if any.
505      deprecated optional Runtime.StackTraceId asyncStackTraceId
506      # Whether the operation was successful or not. Only `Ok` denotes a
507      # successful live edit while the other enum variants denote why
508      # the live edit failed.
509      experimental enum status
510        Ok
511        CompileError
512        BlockedByActiveGenerator
513        BlockedByActiveFunction
514        BlockedByTopLevelEsModuleChange
515      # Exception details if any. Only present when `status` is `CompileError`.
516      optional Runtime.ExceptionDetails exceptionDetails
517
518  # Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
519  command setSkipAllPauses
520    parameters
521      # New value for skip pauses state.
522      boolean skip
523
524  # Changes value of variable in a callframe. Object-based scopes are not supported and must be
525  # mutated manually.
526  command setVariableValue
527    parameters
528      # 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
529      # scope types are allowed. Other scopes could be manipulated manually.
530      integer scopeNumber
531      # Variable name.
532      string variableName
533      # New variable value.
534      Runtime.CallArgument newValue
535      # Id of callframe that holds variable.
536      CallFrameId callFrameId
537
538  # Steps into the function call.
539  command stepInto
540    parameters
541      # Debugger will pause on the execution of the first async task which was scheduled
542      # before next pause.
543      experimental optional boolean breakOnAsyncCall
544      # The skipList specifies location ranges that should be skipped on step into.
545      experimental optional array of LocationRange skipList
546
547  # Steps out of the function call.
548  command stepOut
549
550  # Steps over the statement.
551  command stepOver
552    parameters
553      # The skipList specifies location ranges that should be skipped on step over.
554      experimental optional array of LocationRange skipList
555
556  # Fired when breakpoint is resolved to an actual script and location.
557  event breakpointResolved
558    parameters
559      # Breakpoint unique identifier.
560      BreakpointId breakpointId
561      # Actual breakpoint location.
562      Location location
563
564  # Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
565  event paused
566    parameters
567      # Call stack the virtual machine stopped on.
568      array of CallFrame callFrames
569      # Pause reason.
570      enum reason
571        ambiguous
572        assert
573        CSPViolation
574        debugCommand
575        DOM
576        EventListener
577        exception
578        instrumentation
579        OOM
580        other
581        promiseRejection
582        XHR
583        step
584      # Object containing break-specific auxiliary properties.
585      optional object data
586      # Hit breakpoints IDs
587      optional array of string hitBreakpoints
588      # Async stack trace, if any.
589      optional Runtime.StackTrace asyncStackTrace
590      # Async stack trace, if any.
591      experimental optional Runtime.StackTraceId asyncStackTraceId
592      # Never present, will be removed.
593      experimental deprecated optional Runtime.StackTraceId asyncCallStackTraceId
594
595  # Fired when the virtual machine resumed execution.
596  event resumed
597
598  # Enum of possible script languages.
599  type ScriptLanguage extends string
600    enum
601      JavaScript
602      WebAssembly
603
604  # Debug symbols available for a wasm script.
605  type DebugSymbols extends object
606    properties
607      # Type of the debug symbols.
608      enum type
609        None
610        SourceMap
611        EmbeddedDWARF
612        ExternalDWARF
613      # URL of the external symbol source.
614      optional string externalURL
615
616  # Fired when virtual machine fails to parse the script.
617  event scriptFailedToParse
618    parameters
619      # Identifier of the script parsed.
620      Runtime.ScriptId scriptId
621      # URL or name of the script parsed (if any).
622      string url
623      # Line offset of the script within the resource with given URL (for script tags).
624      integer startLine
625      # Column offset of the script within the resource with given URL.
626      integer startColumn
627      # Last line of the script.
628      integer endLine
629      # Length of the last line of the script.
630      integer endColumn
631      # Specifies script creation context.
632      Runtime.ExecutionContextId executionContextId
633      # Content hash of the script, SHA-256.
634      string hash
635      # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
636      optional object executionContextAuxData
637      # URL of source map associated with script (if any).
638      optional string sourceMapURL
639      # True, if this script has sourceURL.
640      optional boolean hasSourceURL
641      # True, if this script is ES6 module.
642      optional boolean isModule
643      # This script length.
644      optional integer length
645      # JavaScript top stack frame of where the script parsed event was triggered if available.
646      experimental optional Runtime.StackTrace stackTrace
647      # If the scriptLanguage is WebAssembly, the code section offset in the module.
648      experimental optional integer codeOffset
649      # The language of the script.
650      experimental optional Debugger.ScriptLanguage scriptLanguage
651      # The name the embedder supplied for this script.
652      experimental optional string embedderName
653
654  # Fired when virtual machine parses script. This event is also fired for all known and uncollected
655  # scripts upon enabling debugger.
656  event scriptParsed
657    parameters
658      # Identifier of the script parsed.
659      Runtime.ScriptId scriptId
660      # URL or name of the script parsed (if any).
661      string url
662      # Line offset of the script within the resource with given URL (for script tags).
663      integer startLine
664      # Column offset of the script within the resource with given URL.
665      integer startColumn
666      # Last line of the script.
667      integer endLine
668      # Length of the last line of the script.
669      integer endColumn
670      # Specifies script creation context.
671      Runtime.ExecutionContextId executionContextId
672      # Content hash of the script, SHA-256.
673      string hash
674      # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
675      optional object executionContextAuxData
676      # True, if this script is generated as a result of the live edit operation.
677      experimental optional boolean isLiveEdit
678      # URL of source map associated with script (if any).
679      optional string sourceMapURL
680      # True, if this script has sourceURL.
681      optional boolean hasSourceURL
682      # True, if this script is ES6 module.
683      optional boolean isModule
684      # This script length.
685      optional integer length
686      # JavaScript top stack frame of where the script parsed event was triggered if available.
687      experimental optional Runtime.StackTrace stackTrace
688      # If the scriptLanguage is WebAssembly, the code section offset in the module.
689      experimental optional integer codeOffset
690      # The language of the script.
691      experimental optional Debugger.ScriptLanguage scriptLanguage
692      # If the scriptLanguage is WebASsembly, the source of debug symbols for the module.
693      experimental optional Debugger.DebugSymbols debugSymbols
694      # The name the embedder supplied for this script.
695      experimental optional string embedderName
696
697experimental domain HeapProfiler
698  depends on Runtime
699
700  # Heap snapshot object id.
701  type HeapSnapshotObjectId extends string
702
703  # Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
704  type SamplingHeapProfileNode extends object
705    properties
706      # Function location.
707      Runtime.CallFrame callFrame
708      # Allocations size in bytes for the node excluding children.
709      number selfSize
710      # Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
711      integer id
712      # Child nodes.
713      array of SamplingHeapProfileNode children
714
715  # A single sample from a sampling profile.
716  type SamplingHeapProfileSample extends object
717    properties
718      # Allocation size in bytes attributed to the sample.
719      number size
720      # Id of the corresponding profile tree node.
721      integer nodeId
722      # Time-ordered sample ordinal number. It is unique across all profiles retrieved
723      # between startSampling and stopSampling.
724      number ordinal
725
726  # Sampling profile.
727  type SamplingHeapProfile extends object
728    properties
729      SamplingHeapProfileNode head
730      array of SamplingHeapProfileSample samples
731
732  # Enables console to refer to the node with given id via $x (see Command Line API for more details
733  # $x functions).
734  command addInspectedHeapObject
735    parameters
736      # Heap snapshot object id to be accessible by means of $x command line API.
737      HeapSnapshotObjectId heapObjectId
738
739  command collectGarbage
740
741  command disable
742
743  command enable
744
745  command getHeapObjectId
746    parameters
747      # Identifier of the object to get heap object id for.
748      Runtime.RemoteObjectId objectId
749    returns
750      # Id of the heap snapshot object corresponding to the passed remote object id.
751      HeapSnapshotObjectId heapSnapshotObjectId
752
753  command getObjectByHeapObjectId
754    parameters
755      HeapSnapshotObjectId objectId
756      # Symbolic group name that can be used to release multiple objects.
757      optional string objectGroup
758    returns
759      # Evaluation result.
760      Runtime.RemoteObject result
761
762  command getSamplingProfile
763    returns
764      # Return the sampling profile being collected.
765      SamplingHeapProfile profile
766
767  command startSampling
768    parameters
769      # Average sample interval in bytes. Poisson distribution is used for the intervals. The
770      # default value is 32768 bytes.
771      optional number samplingInterval
772      # By default, the sampling heap profiler reports only objects which are
773      # still alive when the profile is returned via getSamplingProfile or
774      # stopSampling, which is useful for determining what functions contribute
775      # the most to steady-state memory usage. This flag instructs the sampling
776      # heap profiler to also include information about objects discarded by
777      # major GC, which will show which functions cause large temporary memory
778      # usage or long GC pauses.
779      optional boolean includeObjectsCollectedByMajorGC
780      # By default, the sampling heap profiler reports only objects which are
781      # still alive when the profile is returned via getSamplingProfile or
782      # stopSampling, which is useful for determining what functions contribute
783      # the most to steady-state memory usage. This flag instructs the sampling
784      # heap profiler to also include information about objects discarded by
785      # minor GC, which is useful when tuning a latency-sensitive application
786      # for minimal GC activity.
787      optional boolean includeObjectsCollectedByMinorGC
788
789  command startTrackingHeapObjects
790    parameters
791      optional boolean trackAllocations
792
793  command stopSampling
794    returns
795      # Recorded sampling heap profile.
796      SamplingHeapProfile profile
797
798  command stopTrackingHeapObjects
799    parameters
800      # If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
801      # when the tracking is stopped.
802      optional boolean reportProgress
803      # Deprecated in favor of `exposeInternals`.
804      deprecated optional boolean treatGlobalObjectsAsRoots
805      # If true, numerical values are included in the snapshot
806      optional boolean captureNumericValue
807      # If true, exposes internals of the snapshot.
808      experimental optional boolean exposeInternals
809
810  command takeHeapSnapshot
811    parameters
812      # If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
813      optional boolean reportProgress
814      # If true, a raw snapshot without artificial roots will be generated.
815      # Deprecated in favor of `exposeInternals`.
816      deprecated optional boolean treatGlobalObjectsAsRoots
817      # If true, numerical values are included in the snapshot
818      optional boolean captureNumericValue
819      # If true, exposes internals of the snapshot.
820      experimental optional boolean exposeInternals
821
822  event addHeapSnapshotChunk
823    parameters
824      string chunk
825
826  # If heap objects tracking has been started then backend may send update for one or more fragments
827  event heapStatsUpdate
828    parameters
829      # An array of triplets. Each triplet describes a fragment. The first integer is the fragment
830      # index, the second integer is a total count of objects for the fragment, the third integer is
831      # a total size of the objects for the fragment.
832      array of integer statsUpdate
833
834  # If heap objects tracking has been started then backend regularly sends a current value for last
835  # seen object id and corresponding timestamp. If the were changes in the heap since last event
836  # then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
837  event lastSeenObjectId
838    parameters
839      integer lastSeenObjectId
840      number timestamp
841
842  event reportHeapSnapshotProgress
843    parameters
844      integer done
845      integer total
846      optional boolean finished
847
848  event resetProfiles
849
850domain Profiler
851  depends on Runtime
852  depends on Debugger
853
854  # Profile node. Holds callsite information, execution statistics and child nodes.
855  type ProfileNode extends object
856    properties
857      # Unique id of the node.
858      integer id
859      # Function location.
860      Runtime.CallFrame callFrame
861      # Number of samples where this node was on top of the call stack.
862      optional integer hitCount
863      # Child node ids.
864      optional array of integer children
865      # The reason of being not optimized. The function may be deoptimized or marked as don't
866      # optimize.
867      optional string deoptReason
868      # An array of source position ticks.
869      optional array of PositionTickInfo positionTicks
870
871  # Profile.
872  type Profile extends object
873    properties
874      # The list of profile nodes. First item is the root node.
875      array of ProfileNode nodes
876      # Profiling start timestamp in microseconds.
877      number startTime
878      # Profiling end timestamp in microseconds.
879      number endTime
880      # Ids of samples top nodes.
881      optional array of integer samples
882      # Time intervals between adjacent samples in microseconds. The first delta is relative to the
883      # profile startTime.
884      optional array of integer timeDeltas
885
886  # Specifies a number of samples attributed to a certain source position.
887  type PositionTickInfo extends object
888    properties
889      # Source line number (1-based).
890      integer line
891      # Number of samples attributed to the source line.
892      integer ticks
893
894  # Coverage data for a source range.
895  type CoverageRange extends object
896    properties
897      # JavaScript script source offset for the range start.
898      integer startOffset
899      # JavaScript script source offset for the range end.
900      integer endOffset
901      # Collected execution count of the source range.
902      integer count
903
904  # Coverage data for a JavaScript function.
905  type FunctionCoverage extends object
906    properties
907      # JavaScript function name.
908      string functionName
909      # Source ranges inside the function with coverage data.
910      array of CoverageRange ranges
911      # Whether coverage data for this function has block granularity.
912      boolean isBlockCoverage
913
914  # Coverage data for a JavaScript script.
915  type ScriptCoverage extends object
916    properties
917      # JavaScript script id.
918      Runtime.ScriptId scriptId
919      # JavaScript script name or url.
920      string url
921      # Functions contained in the script that has coverage data.
922      array of FunctionCoverage functions
923
924  command disable
925
926  command enable
927
928  # Collect coverage data for the current isolate. The coverage data may be incomplete due to
929  # garbage collection.
930  command getBestEffortCoverage
931    returns
932      # Coverage data for the current isolate.
933      array of ScriptCoverage result
934
935  # Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
936  command setSamplingInterval
937    parameters
938      # New sampling interval in microseconds.
939      integer interval
940
941  command start
942
943  # Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
944  # coverage may be incomplete. Enabling prevents running optimized code and resets execution
945  # counters.
946  command startPreciseCoverage
947    parameters
948      # Collect accurate call counts beyond simple 'covered' or 'not covered'.
949      optional boolean callCount
950      # Collect block-based coverage.
951      optional boolean detailed
952      # Allow the backend to send updates on its own initiative
953      optional boolean allowTriggeredUpdates
954    returns
955      # Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
956      number timestamp
957
958  command stop
959    returns
960      # Recorded profile.
961      Profile profile
962
963  # Disable precise code coverage. Disabling releases unnecessary execution count records and allows
964  # executing optimized code.
965  command stopPreciseCoverage
966
967  # Collect coverage data for the current isolate, and resets execution counters. Precise code
968  # coverage needs to have started.
969  command takePreciseCoverage
970    returns
971      # Coverage data for the current isolate.
972      array of ScriptCoverage result
973      # Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
974      number timestamp
975
976  event consoleProfileFinished
977    parameters
978      string id
979      # Location of console.profileEnd().
980      Debugger.Location location
981      Profile profile
982      # Profile title passed as an argument to console.profile().
983      optional string title
984
985  # Sent when new profile recording is started using console.profile() call.
986  event consoleProfileStarted
987    parameters
988      string id
989      # Location of console.profile().
990      Debugger.Location location
991      # Profile title passed as an argument to console.profile().
992      optional string title
993
994  # Reports coverage delta since the last poll (either from an event like this, or from
995  # `takePreciseCoverage` for the current isolate. May only be sent if precise code
996  # coverage has been started. This event can be trigged by the embedder to, for example,
997  # trigger collection of coverage data immediately at a certain point in time.
998  experimental event preciseCoverageDeltaUpdate
999    parameters
1000      # Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
1001      number timestamp
1002      # Identifier for distinguishing coverage events.
1003      string occasion
1004      # Coverage data for the current isolate.
1005      array of ScriptCoverage result
1006
1007# Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects.
1008# Evaluation results are returned as mirror object that expose object type, string representation
1009# and unique identifier that can be used for further object reference. Original objects are
1010# maintained in memory unless they are either explicitly released or are released along with the
1011# other objects in their object group.
1012domain Runtime
1013
1014  # Unique script identifier.
1015  type ScriptId extends string
1016
1017  # Represents the value serialiazed by the WebDriver BiDi specification
1018  # https://w3c.github.io/webdriver-bidi.
1019  type WebDriverValue extends object
1020    properties
1021      enum type
1022        undefined
1023        null
1024        string
1025        number
1026        boolean
1027        bigint
1028        regexp
1029        date
1030        symbol
1031        array
1032        object
1033        function
1034        map
1035        set
1036        weakmap
1037        weakset
1038        error
1039        proxy
1040        promise
1041        typedarray
1042        arraybuffer
1043        node
1044        window
1045      optional any value
1046      optional string objectId
1047
1048  # Unique object identifier.
1049  type RemoteObjectId extends string
1050
1051  # Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`,
1052  # `-Infinity`, and bigint literals.
1053  type UnserializableValue extends string
1054
1055  # Mirror object referencing original JavaScript object.
1056  type RemoteObject extends object
1057    properties
1058      # Object type.
1059      enum type
1060        object
1061        function
1062        undefined
1063        string
1064        number
1065        boolean
1066        symbol
1067        bigint
1068      # Object subtype hint. Specified for `object` type values only.
1069      # NOTE: If you change anything here, make sure to also update
1070      # `subtype` in `ObjectPreview` and `PropertyPreview` below.
1071      optional enum subtype
1072        array
1073        null
1074        node
1075        regexp
1076        date
1077        map
1078        set
1079        weakmap
1080        weakset
1081        iterator
1082        generator
1083        error
1084        proxy
1085        promise
1086        typedarray
1087        arraybuffer
1088        dataview
1089        webassemblymemory
1090        wasmvalue
1091      # Object class (constructor) name. Specified for `object` type values only.
1092      optional string className
1093      # Remote object value in case of primitive values or JSON values (if it was requested).
1094      optional any value
1095      # Primitive value which can not be JSON-stringified does not have `value`, but gets this
1096      # property.
1097      optional UnserializableValue unserializableValue
1098      # String representation of the object.
1099      optional string description
1100      # WebDriver BiDi representation of the value.
1101      experimental optional WebDriverValue webDriverValue
1102      # Unique object identifier (for non-primitive values).
1103      optional RemoteObjectId objectId
1104      # Preview containing abbreviated property values. Specified for `object` type values only.
1105      experimental optional ObjectPreview preview
1106      experimental optional CustomPreview customPreview
1107
1108  experimental type CustomPreview extends object
1109    properties
1110      # The JSON-stringified result of formatter.header(object, config) call.
1111      # It contains json ML array that represents RemoteObject.
1112      string header
1113      # If formatter returns true as a result of formatter.hasBody call then bodyGetterId will
1114      # contain RemoteObjectId for the function that returns result of formatter.body(object, config) call.
1115      # The result value is json ML array.
1116      optional RemoteObjectId bodyGetterId
1117
1118  # Object containing abbreviated remote object value.
1119  experimental type ObjectPreview extends object
1120    properties
1121      # Object type.
1122      enum type
1123        object
1124        function
1125        undefined
1126        string
1127        number
1128        boolean
1129        symbol
1130        bigint
1131      # Object subtype hint. Specified for `object` type values only.
1132      optional enum subtype
1133        array
1134        null
1135        node
1136        regexp
1137        date
1138        map
1139        set
1140        weakmap
1141        weakset
1142        iterator
1143        generator
1144        error
1145        proxy
1146        promise
1147        typedarray
1148        arraybuffer
1149        dataview
1150        webassemblymemory
1151        wasmvalue
1152      # String representation of the object.
1153      optional string description
1154      # True iff some of the properties or entries of the original object did not fit.
1155      boolean overflow
1156      # List of the properties.
1157      array of PropertyPreview properties
1158      # List of the entries. Specified for `map` and `set` subtype values only.
1159      optional array of EntryPreview entries
1160
1161  experimental type PropertyPreview extends object
1162    properties
1163      # Property name.
1164      string name
1165      # Object type. Accessor means that the property itself is an accessor property.
1166      enum type
1167        object
1168        function
1169        undefined
1170        string
1171        number
1172        boolean
1173        symbol
1174        accessor
1175        bigint
1176      # User-friendly property value string.
1177      optional string value
1178      # Nested value preview.
1179      optional ObjectPreview valuePreview
1180      # Object subtype hint. Specified for `object` type values only.
1181      optional enum subtype
1182        array
1183        null
1184        node
1185        regexp
1186        date
1187        map
1188        set
1189        weakmap
1190        weakset
1191        iterator
1192        generator
1193        error
1194        proxy
1195        promise
1196        typedarray
1197        arraybuffer
1198        dataview
1199        webassemblymemory
1200        wasmvalue
1201
1202  experimental type EntryPreview extends object
1203    properties
1204      # Preview of the key. Specified for map-like collection entries.
1205      optional ObjectPreview key
1206      # Preview of the value.
1207      ObjectPreview value
1208
1209  # Object property descriptor.
1210  type PropertyDescriptor extends object
1211    properties
1212      # Property name or symbol description.
1213      string name
1214      # The value associated with the property.
1215      optional RemoteObject value
1216      # True if the value associated with the property may be changed (data descriptors only).
1217      optional boolean writable
1218      # A function which serves as a getter for the property, or `undefined` if there is no getter
1219      # (accessor descriptors only).
1220      optional RemoteObject get
1221      # A function which serves as a setter for the property, or `undefined` if there is no setter
1222      # (accessor descriptors only).
1223      optional RemoteObject set
1224      # True if the type of this property descriptor may be changed and if the property may be
1225      # deleted from the corresponding object.
1226      boolean configurable
1227      # True if this property shows up during enumeration of the properties on the corresponding
1228      # object.
1229      boolean enumerable
1230      # True if the result was thrown during the evaluation.
1231      optional boolean wasThrown
1232      # True if the property is owned for the object.
1233      optional boolean isOwn
1234      # Property symbol object, if the property is of the `symbol` type.
1235      optional RemoteObject symbol
1236
1237  # Object internal property descriptor. This property isn't normally visible in JavaScript code.
1238  type InternalPropertyDescriptor extends object
1239    properties
1240      # Conventional property name.
1241      string name
1242      # The value associated with the property.
1243      optional RemoteObject value
1244
1245  # Object private field descriptor.
1246  experimental type PrivatePropertyDescriptor extends object
1247    properties
1248      # Private property name.
1249      string name
1250      # The value associated with the private property.
1251      optional RemoteObject value
1252      # A function which serves as a getter for the private property,
1253      # or `undefined` if there is no getter (accessor descriptors only).
1254      optional RemoteObject get
1255      # A function which serves as a setter for the private property,
1256      # or `undefined` if there is no setter (accessor descriptors only).
1257      optional RemoteObject set
1258
1259  # Represents function call argument. Either remote object id `objectId`, primitive `value`,
1260  # unserializable primitive value or neither of (for undefined) them should be specified.
1261  type CallArgument extends object
1262    properties
1263      # Primitive value or serializable javascript object.
1264      optional any value
1265      # Primitive value which can not be JSON-stringified.
1266      optional UnserializableValue unserializableValue
1267      # Remote object handle.
1268      optional RemoteObjectId objectId
1269
1270  # Id of an execution context.
1271  type ExecutionContextId extends integer
1272
1273  # Description of an isolated world.
1274  type ExecutionContextDescription extends object
1275    properties
1276      # Unique id of the execution context. It can be used to specify in which execution context
1277      # script evaluation should be performed.
1278      ExecutionContextId id
1279      # Execution context origin.
1280      string origin
1281      # Human readable name describing given context.
1282      string name
1283      # A system-unique execution context identifier. Unlike the id, this is unique across
1284      # multiple processes, so can be reliably used to identify specific context while backend
1285      # performs a cross-process navigation.
1286      experimental string uniqueId
1287      # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
1288      optional object auxData
1289
1290  # Detailed information about exception (or error) that was thrown during script compilation or
1291  # execution.
1292  type ExceptionDetails extends object
1293    properties
1294      # Exception id.
1295      integer exceptionId
1296      # Exception text, which should be used together with exception object when available.
1297      string text
1298      # Line number of the exception location (0-based).
1299      integer lineNumber
1300      # Column number of the exception location (0-based).
1301      integer columnNumber
1302      # Script ID of the exception location.
1303      optional ScriptId scriptId
1304      # URL of the exception location, to be used when the script was not reported.
1305      optional string url
1306      # JavaScript stack trace if available.
1307      optional StackTrace stackTrace
1308      # Exception object if available.
1309      optional RemoteObject exception
1310      # Identifier of the context where exception happened.
1311      optional ExecutionContextId executionContextId
1312      # Dictionary with entries of meta data that the client associated
1313      # with this exception, such as information about associated network
1314      # requests, etc.
1315      experimental optional object exceptionMetaData
1316
1317  # Number of milliseconds since epoch.
1318  type Timestamp extends number
1319
1320  # Number of milliseconds.
1321  type TimeDelta extends number
1322
1323  # Stack entry for runtime errors and assertions.
1324  type CallFrame extends object
1325    properties
1326      # JavaScript function name.
1327      string functionName
1328      # JavaScript script id.
1329      ScriptId scriptId
1330      # JavaScript script name or url.
1331      string url
1332      # JavaScript script line number (0-based).
1333      integer lineNumber
1334      # JavaScript script column number (0-based).
1335      integer columnNumber
1336
1337  # Call frames for assertions or error messages.
1338  type StackTrace extends object
1339    properties
1340      # String label of this stack trace. For async traces this may be a name of the function that
1341      # initiated the async call.
1342      optional string description
1343      # JavaScript function name.
1344      array of CallFrame callFrames
1345      # Asynchronous JavaScript stack trace that preceded this stack, if available.
1346      optional StackTrace parent
1347      # Asynchronous JavaScript stack trace that preceded this stack, if available.
1348      experimental optional StackTraceId parentId
1349
1350  # Unique identifier of current debugger.
1351  experimental type UniqueDebuggerId extends string
1352
1353  # If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This
1354  # allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.
1355  experimental type StackTraceId extends object
1356    properties
1357      string id
1358      optional UniqueDebuggerId debuggerId
1359
1360  # Add handler to promise with given promise object id.
1361  command awaitPromise
1362    parameters
1363      # Identifier of the promise.
1364      RemoteObjectId promiseObjectId
1365      # Whether the result is expected to be a JSON object that should be sent by value.
1366      optional boolean returnByValue
1367      # Whether preview should be generated for the result.
1368      optional boolean generatePreview
1369    returns
1370      # Promise result. Will contain rejected value if promise was rejected.
1371      RemoteObject result
1372      # Exception details if stack strace is available.
1373      optional ExceptionDetails exceptionDetails
1374
1375  # Calls function with given declaration on the given object. Object group of the result is
1376  # inherited from the target object.
1377  command callFunctionOn
1378    parameters
1379      # Declaration of the function to call.
1380      string functionDeclaration
1381      # Identifier of the object to call function on. Either objectId or executionContextId should
1382      # be specified.
1383      optional RemoteObjectId objectId
1384      # Call arguments. All call arguments must belong to the same JavaScript world as the target
1385      # object.
1386      optional array of CallArgument arguments
1387      # In silent mode exceptions thrown during evaluation are not reported and do not pause
1388      # execution. Overrides `setPauseOnException` state.
1389      optional boolean silent
1390      # Whether the result is expected to be a JSON object which should be sent by value.
1391      optional boolean returnByValue
1392      # Whether preview should be generated for the result.
1393      experimental optional boolean generatePreview
1394      # Whether execution should be treated as initiated by user in the UI.
1395      optional boolean userGesture
1396      # Whether execution should `await` for resulting value and return once awaited promise is
1397      # resolved.
1398      optional boolean awaitPromise
1399      # Specifies execution context which global object will be used to call function on. Either
1400      # executionContextId or objectId should be specified.
1401      optional ExecutionContextId executionContextId
1402      # Symbolic group name that can be used to release multiple objects. If objectGroup is not
1403      # specified and objectId is, objectGroup will be inherited from object.
1404      optional string objectGroup
1405      # Whether to throw an exception if side effect cannot be ruled out during evaluation.
1406      experimental optional boolean throwOnSideEffect
1407      # An alternative way to specify the execution context to call function on.
1408      # Compared to contextId that may be reused across processes, this is guaranteed to be
1409      # system-unique, so it can be used to prevent accidental function call
1410      # in context different than intended (e.g. as a result of navigation across process
1411      # boundaries).
1412      # This is mutually exclusive with `executionContextId`.
1413      experimental optional string uniqueContextId
1414      # Whether the result should contain `webDriverValue`, serialized according to
1415      # https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but
1416      # resulting `objectId` is still provided.
1417      experimental optional boolean generateWebDriverValue
1418    returns
1419      # Call result.
1420      RemoteObject result
1421      # Exception details.
1422      optional ExceptionDetails exceptionDetails
1423
1424  # Compiles expression.
1425  command compileScript
1426    parameters
1427      # Expression to compile.
1428      string expression
1429      # Source url to be set for the script.
1430      string sourceURL
1431      # Specifies whether the compiled script should be persisted.
1432      boolean persistScript
1433      # Specifies in which execution context to perform script run. If the parameter is omitted the
1434      # evaluation will be performed in the context of the inspected page.
1435      optional ExecutionContextId executionContextId
1436    returns
1437      # Id of the script.
1438      optional ScriptId scriptId
1439      # Exception details.
1440      optional ExceptionDetails exceptionDetails
1441
1442  # Disables reporting of execution contexts creation.
1443  command disable
1444
1445  # Discards collected exceptions and console API calls.
1446  command discardConsoleEntries
1447
1448  # Enables reporting of execution contexts creation by means of `executionContextCreated` event.
1449  # When the reporting gets enabled the event will be sent immediately for each existing execution
1450  # context.
1451  command enable
1452
1453  # Evaluates expression on global object.
1454  command evaluate
1455    parameters
1456      # Expression to evaluate.
1457      string expression
1458      # Symbolic group name that can be used to release multiple objects.
1459      optional string objectGroup
1460      # Determines whether Command Line API should be available during the evaluation.
1461      optional boolean includeCommandLineAPI
1462      # In silent mode exceptions thrown during evaluation are not reported and do not pause
1463      # execution. Overrides `setPauseOnException` state.
1464      optional boolean silent
1465      # Specifies in which execution context to perform evaluation. If the parameter is omitted the
1466      # evaluation will be performed in the context of the inspected page.
1467      # This is mutually exclusive with `uniqueContextId`, which offers an
1468      # alternative way to identify the execution context that is more reliable
1469      # in a multi-process environment.
1470      optional ExecutionContextId contextId
1471      # Whether the result is expected to be a JSON object that should be sent by value.
1472      optional boolean returnByValue
1473      # Whether preview should be generated for the result.
1474      experimental optional boolean generatePreview
1475      # Whether execution should be treated as initiated by user in the UI.
1476      optional boolean userGesture
1477      # Whether execution should `await` for resulting value and return once awaited promise is
1478      # resolved.
1479      optional boolean awaitPromise
1480      # Whether to throw an exception if side effect cannot be ruled out during evaluation.
1481      # This implies `disableBreaks` below.
1482      experimental optional boolean throwOnSideEffect
1483      # Terminate execution after timing out (number of milliseconds).
1484      experimental optional TimeDelta timeout
1485      # Disable breakpoints during execution.
1486      experimental optional boolean disableBreaks
1487      # Setting this flag to true enables `let` re-declaration and top-level `await`.
1488      # Note that `let` variables can only be re-declared if they originate from
1489      # `replMode` themselves.
1490      experimental optional boolean replMode
1491      # The Content Security Policy (CSP) for the target might block 'unsafe-eval'
1492      # which includes eval(), Function(), setTimeout() and setInterval()
1493      # when called with non-callable arguments. This flag bypasses CSP for this
1494      # evaluation and allows unsafe-eval. Defaults to true.
1495      experimental optional boolean allowUnsafeEvalBlockedByCSP
1496      # An alternative way to specify the execution context to evaluate in.
1497      # Compared to contextId that may be reused across processes, this is guaranteed to be
1498      # system-unique, so it can be used to prevent accidental evaluation of the expression
1499      # in context different than intended (e.g. as a result of navigation across process
1500      # boundaries).
1501      # This is mutually exclusive with `contextId`.
1502      experimental optional string uniqueContextId
1503      # Whether the result should be serialized according to https://w3c.github.io/webdriver-bidi.
1504      experimental optional boolean generateWebDriverValue
1505    returns
1506      # Evaluation result.
1507      RemoteObject result
1508      # Exception details.
1509      optional ExceptionDetails exceptionDetails
1510
1511  # Returns the isolate id.
1512  experimental command getIsolateId
1513    returns
1514      # The isolate id.
1515      string id
1516
1517  # Returns the JavaScript heap usage.
1518  # It is the total usage of the corresponding isolate not scoped to a particular Runtime.
1519  experimental command getHeapUsage
1520    returns
1521      # Used heap size in bytes.
1522      number usedSize
1523      # Allocated heap size in bytes.
1524      number totalSize
1525
1526  # Returns properties of a given object. Object group of the result is inherited from the target
1527  # object.
1528  command getProperties
1529    parameters
1530      # Identifier of the object to return properties for.
1531      RemoteObjectId objectId
1532      # If true, returns properties belonging only to the element itself, not to its prototype
1533      # chain.
1534      optional boolean ownProperties
1535      # If true, returns accessor properties (with getter/setter) only; internal properties are not
1536      # returned either.
1537      experimental optional boolean accessorPropertiesOnly
1538      # Whether preview should be generated for the results.
1539      experimental optional boolean generatePreview
1540      # If true, returns non-indexed properties only.
1541      experimental optional boolean nonIndexedPropertiesOnly
1542    returns
1543      # Object properties.
1544      array of PropertyDescriptor result
1545      # Internal object properties (only of the element itself).
1546      optional array of InternalPropertyDescriptor internalProperties
1547      # Object private properties.
1548      experimental optional array of PrivatePropertyDescriptor privateProperties
1549      # Exception details.
1550      optional ExceptionDetails exceptionDetails
1551
1552  # Returns all let, const and class variables from global scope.
1553  command globalLexicalScopeNames
1554    parameters
1555      # Specifies in which execution context to lookup global scope variables.
1556      optional ExecutionContextId executionContextId
1557    returns
1558      array of string names
1559
1560  command queryObjects
1561    parameters
1562      # Identifier of the prototype to return objects for.
1563      RemoteObjectId prototypeObjectId
1564      # Symbolic group name that can be used to release the results.
1565      optional string objectGroup
1566    returns
1567      # Array with objects.
1568      RemoteObject objects
1569
1570  # Releases remote object with given id.
1571  command releaseObject
1572    parameters
1573      # Identifier of the object to release.
1574      RemoteObjectId objectId
1575
1576  # Releases all remote objects that belong to a given group.
1577  command releaseObjectGroup
1578    parameters
1579      # Symbolic object group name.
1580      string objectGroup
1581
1582  # Tells inspected instance to run if it was waiting for debugger to attach.
1583  command runIfWaitingForDebugger
1584
1585  # Runs script with given id in a given context.
1586  command runScript
1587    parameters
1588      # Id of the script to run.
1589      ScriptId scriptId
1590      # Specifies in which execution context to perform script run. If the parameter is omitted the
1591      # evaluation will be performed in the context of the inspected page.
1592      optional ExecutionContextId executionContextId
1593      # Symbolic group name that can be used to release multiple objects.
1594      optional string objectGroup
1595      # In silent mode exceptions thrown during evaluation are not reported and do not pause
1596      # execution. Overrides `setPauseOnException` state.
1597      optional boolean silent
1598      # Determines whether Command Line API should be available during the evaluation.
1599      optional boolean includeCommandLineAPI
1600      # Whether the result is expected to be a JSON object which should be sent by value.
1601      optional boolean returnByValue
1602      # Whether preview should be generated for the result.
1603      optional boolean generatePreview
1604      # Whether execution should `await` for resulting value and return once awaited promise is
1605      # resolved.
1606      optional boolean awaitPromise
1607    returns
1608      # Run result.
1609      RemoteObject result
1610      # Exception details.
1611      optional ExceptionDetails exceptionDetails
1612
1613  # Enables or disables async call stacks tracking.
1614  command setAsyncCallStackDepth
1615    redirect Debugger
1616    parameters
1617      # Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
1618      # call stacks (default).
1619      integer maxDepth
1620
1621  experimental command setCustomObjectFormatterEnabled
1622    parameters
1623      boolean enabled
1624
1625  experimental command setMaxCallStackSizeToCapture
1626    parameters
1627      integer size
1628
1629  # Terminate current or next JavaScript execution.
1630  # Will cancel the termination when the outer-most script execution ends.
1631  experimental command terminateExecution
1632
1633  # If executionContextId is empty, adds binding with the given name on the
1634  # global objects of all inspected contexts, including those created later,
1635  # bindings survive reloads.
1636  # Binding function takes exactly one argument, this argument should be string,
1637  # in case of any other input, function throws an exception.
1638  # Each binding function call produces Runtime.bindingCalled notification.
1639  experimental command addBinding
1640    parameters
1641      string name
1642      # If specified, the binding would only be exposed to the specified
1643      # execution context. If omitted and `executionContextName` is not set,
1644      # the binding is exposed to all execution contexts of the target.
1645      # This parameter is mutually exclusive with `executionContextName`.
1646      # Deprecated in favor of `executionContextName` due to an unclear use case
1647      # and bugs in implementation (crbug.com/1169639). `executionContextId` will be
1648      # removed in the future.
1649      deprecated optional ExecutionContextId executionContextId
1650      # If specified, the binding is exposed to the executionContext with
1651      # matching name, even for contexts created after the binding is added.
1652      # See also `ExecutionContext.name` and `worldName` parameter to
1653      # `Page.addScriptToEvaluateOnNewDocument`.
1654      # This parameter is mutually exclusive with `executionContextId`.
1655      experimental optional string executionContextName
1656
1657  # This method does not remove binding function from global object but
1658  # unsubscribes current runtime agent from Runtime.bindingCalled notifications.
1659  experimental command removeBinding
1660    parameters
1661      string name
1662
1663  # This method tries to lookup and populate exception details for a
1664  # JavaScript Error object.
1665  # Note that the stackTrace portion of the resulting exceptionDetails will
1666  # only be populated if the Runtime domain was enabled at the time when the
1667  # Error was thrown.
1668  experimental command getExceptionDetails
1669    parameters
1670      # The error object for which to resolve the exception details.
1671      RemoteObjectId errorObjectId
1672    returns
1673      optional ExceptionDetails exceptionDetails
1674
1675  # Notification is issued every time when binding is called.
1676  experimental event bindingCalled
1677    parameters
1678      string name
1679      string payload
1680      # Identifier of the context where the call was made.
1681      ExecutionContextId executionContextId
1682
1683  # Issued when console API was called.
1684  event consoleAPICalled
1685    parameters
1686      # Type of the call.
1687      enum type
1688        log
1689        debug
1690        info
1691        error
1692        warning
1693        dir
1694        dirxml
1695        table
1696        trace
1697        clear
1698        startGroup
1699        startGroupCollapsed
1700        endGroup
1701        assert
1702        profile
1703        profileEnd
1704        count
1705        timeEnd
1706      # Call arguments.
1707      array of RemoteObject args
1708      # Identifier of the context where the call was made.
1709      ExecutionContextId executionContextId
1710      # Call timestamp.
1711      Timestamp timestamp
1712      # Stack trace captured when the call was made. The async stack chain is automatically reported for
1713      # the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call
1714      # chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field.
1715      optional StackTrace stackTrace
1716      # Console context descriptor for calls on non-default console context (not console.*):
1717      # 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call
1718      # on named context.
1719      experimental optional string context
1720
1721  # Issued when unhandled exception was revoked.
1722  event exceptionRevoked
1723    parameters
1724      # Reason describing why exception was revoked.
1725      string reason
1726      # The id of revoked exception, as reported in `exceptionThrown`.
1727      integer exceptionId
1728
1729  # Issued when exception was thrown and unhandled.
1730  event exceptionThrown
1731    parameters
1732      # Timestamp of the exception.
1733      Timestamp timestamp
1734      ExceptionDetails exceptionDetails
1735
1736  # Issued when new execution context is created.
1737  event executionContextCreated
1738    parameters
1739      # A newly created execution context.
1740      ExecutionContextDescription context
1741
1742  # Issued when execution context is destroyed.
1743  event executionContextDestroyed
1744    parameters
1745      # Id of the destroyed context
1746      deprecated ExecutionContextId executionContextId
1747      # Unique Id of the destroyed context
1748      experimental string executionContextUniqueId
1749
1750  # Issued when all executionContexts were cleared in browser
1751  event executionContextsCleared
1752
1753  # Issued when object should be inspected (for example, as a result of inspect() command line API
1754  # call).
1755  event inspectRequested
1756    parameters
1757      RemoteObject object
1758      object hints
1759      # Identifier of the context where the call was made.
1760      experimental optional ExecutionContextId executionContextId
1761
1762# This domain is deprecated.
1763deprecated domain Schema
1764
1765  # Description of the protocol domain.
1766  type Domain extends object
1767    properties
1768      # Domain name.
1769      string name
1770      # Domain version.
1771      string version
1772
1773  # Returns supported domains.
1774  command getDomains
1775    returns
1776      # List of supported domains.
1777      array of Domain domains
1778