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