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