001package Torello.Browser.JavaScriptAPI; 002 003// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 004// Java-HTML Imports 005// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 006 007import Torello.Browser.*; 008import Torello.Browser.helper.*; 009import Torello.Browser.BrowserAPI.*; 010import Torello.JSON.*; 011 012import Torello.Java.ReadOnly.ReadOnlyList; 013import Torello.Java.ReadOnly.ReadOnlyArrayList; 014 015import Torello.JavaDoc.Annotations.StaticFunctional; 016import Torello.JavaDoc.Annotations.JDHeaderBackgroundImg; 017 018import Torello.Browser.JavaScriptAPI.NestedHelpers.Commands.Debugger$$Commands; 019 020 021// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 022// JDK Imports 023// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 024 025import javax.json.JsonObject; 026import javax.json.JsonValue; 027 028/** 029 * <SPAN CLASS=COPIEDJDK><B>Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing 030 * breakpoints, stepping through execution, exploring stack traces, etc.</B></SPAN> 031 * <EMBED CLASS='external-html' DATA-FILE-ID=CDP.CODE_GEN_NOTE> 032 */ 033@StaticFunctional@JDHeaderBackgroundImg(EmbedTagFileID="CDP.WOOD_PLANK_NOTE") 034public class Debugger 035{ 036 // No Pubic Constructors 037 private Debugger() { } 038 039 040 // ******************************************************************************************** 041 // ******************************************************************************************** 042 // Eliminated Types 043 // ******************************************************************************************** 044 // ******************************************************************************************** 045 046 047 /** 048 * Breakpoint identifier. 049 050 * <EMBED CLASS='external-html' DATA-CTAS='String' DATA-FILE-ID=CDP.EliminatedType 051 * DATA-NAME=BreakpointId> 052 */ 053 public static final String BreakpointId = 054 "BreakpointId has been eliminated.\n" + 055 "It was replaced with the standard Java-Type: String"; 056 057 /** 058 * Call frame identifier. 059 060 * <EMBED CLASS='external-html' DATA-CTAS='String' DATA-FILE-ID=CDP.EliminatedType 061 * DATA-NAME=CallFrameId> 062 */ 063 public static final String CallFrameId = 064 "CallFrameId has been eliminated.\n" + 065 "It was replaced with the standard Java-Type: String"; 066 067 068 // ******************************************************************************************** 069 // ******************************************************************************************** 070 // Marker Events 071 // ******************************************************************************************** 072 // ******************************************************************************************** 073 074 075 /** 076 * Fired when the virtual machine resumed execution. 077 078 * 079 * <EMBED CLASS='external-html' DATA-FILE-ID=CDP.MarkerEvent 080 * DATA-NAME=resumed> 081 */ 082 public static final String resumed = "Debugger.resumed Marker Event"; 083 084 085 // ******************************************************************************************** 086 // ******************************************************************************************** 087 // Enumerated String Constants Lists 088 // ******************************************************************************************** 089 // ******************************************************************************************** 090 091 092 /** 093 * Enum of possible script languages. 094 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 095 */ 096 public static final ReadOnlyList<String> ScriptLanguage = new ReadOnlyArrayList<> 097 (String.class, "JavaScript", "WebAssembly"); 098 099 100 101 // ******************************************************************************************** 102 // ******************************************************************************************** 103 // Basic Types 104 // ******************************************************************************************** 105 // ******************************************************************************************** 106 107 108 /** 109 * <CODE>[No Description Provided by Google]</CODE> 110 * 111 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI> 112 */ 113 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 114 public static class BreakLocation 115 extends BaseType<BreakLocation> 116 implements java.io.Serializable 117 { 118 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 119 protected static final long serialVersionUID = 1; 120 121 private static final NestedHelper<Debugger.BreakLocation> singleton = 122 Torello.Browser.JavaScriptAPI.NestedHelpers.Types. 123 Debugger$$BreakLocation$$.singleton; 124 125 /** Script identifier as reported in the <CODE>Debugger.scriptParsed</CODE>. */ 126 public final String scriptId; 127 128 /** Line number in the script (0-based). */ 129 public final int lineNumber; 130 131 /** 132 * Column number in the script (0-based). 133 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 134 */ 135 public final Integer columnNumber; 136 137 /** 138 * <CODE>[No Description Provided by Google]</CODE> 139 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 140 * <EMBED CLASS='external-html' DATA-D=Debugger DATA-C=BreakLocation DATA-F=type DATA-FILE-ID=CDP.EL1> 141 * @see BaseType#enumStrList(String) 142 */ 143 public final String type; 144 145 /** Constructor. Please review this class' fields for documentation. */ 146 public BreakLocation( 147 ReadOnlyList<Boolean> isPresent, String scriptId, int lineNumber, 148 Integer columnNumber, String type 149 ) 150 { 151 super(singleton, Domains.Debugger, "BreakLocation", 4); 152 153 this.scriptId = scriptId; 154 this.lineNumber = lineNumber; 155 this.columnNumber = columnNumber; 156 this.type = type; 157 158 this.isPresent = (isPresent == null) 159 ? singleton.generateIsPresentList(this) 160 : THROWS.check(isPresent, 4, "Debugger.BreakLocation"); 161 } 162 163 /** Creates an instance of this class from a {@link JsonObject}.*/ 164 public static BreakLocation fromJSON(JsonObject jo) 165 { return singleton.fromJSON(jo); } 166 167 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 168 public static NestedDescriptor<BreakLocation> descriptor() 169 { return singleton.descriptor(); } 170 } 171 172 /** 173 * JavaScript call frame. Array of call frames form the call stack. 174 * 175 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI> 176 */ 177 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 178 public static class CallFrame 179 extends BaseType<CallFrame> 180 implements java.io.Serializable 181 { 182 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 183 protected static final long serialVersionUID = 1; 184 185 private static final NestedHelper<Debugger.CallFrame> singleton = 186 Torello.Browser.JavaScriptAPI.NestedHelpers.Types. 187 Debugger$$CallFrame$$.singleton; 188 189 /** Call frame identifier. This identifier is only valid while the virtual machine is paused. */ 190 public final String callFrameId; 191 192 /** Name of the JavaScript function called on this call frame. */ 193 public final String functionName; 194 195 /** 196 * Location in the source code. 197 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 198 */ 199 public final Debugger.Location functionLocation; 200 201 /** Location in the source code. */ 202 public final Debugger.Location location; 203 204 /** 205 * JavaScript script name or url. 206 * Deprecated in favor of using the <CODE>location.scriptId</CODE> to resolve the URL via a previously 207 * sent <CODE>Debugger.scriptParsed</CODE> event. 208 * <BR /><B CLASS=Dep-Top>DEPRECATED</B> 209 */ 210 public final String url; 211 212 /** Scope chain for this call frame. */ 213 public final Debugger.Scope[] scopeChain; 214 215 /** <CODE>this</CODE> object for this call frame. */ 216 public final RunTime.RemoteObject _this; 217 218 /** 219 * The value being returned, if the function is at return point. 220 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 221 */ 222 public final RunTime.RemoteObject returnValue; 223 224 /** 225 * Valid only while the VM is paused and indicates whether this frame 226 * can be restarted or not. Note that a <CODE>true</CODE> value here does not 227 * guarantee that Debugger#restartFrame with this CallFrameId will be 228 * successful, but it is very likely. 229 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 230 */ 231 public final Boolean canBeRestarted; 232 233 /** Constructor. Please review this class' fields for documentation. */ 234 public CallFrame( 235 ReadOnlyList<Boolean> isPresent, String callFrameId, String functionName, 236 Location functionLocation, Location location, String url, Scope[] scopeChain, 237 RunTime.RemoteObject _this, RunTime.RemoteObject returnValue, 238 Boolean canBeRestarted 239 ) 240 { 241 super(singleton, Domains.Debugger, "CallFrame", 9); 242 243 this.callFrameId = callFrameId; 244 this.functionName = functionName; 245 this.functionLocation = functionLocation; 246 this.location = location; 247 this.url = url; 248 this.scopeChain = scopeChain; 249 this._this = _this; 250 this.returnValue = returnValue; 251 this.canBeRestarted = canBeRestarted; 252 253 this.isPresent = (isPresent == null) 254 ? singleton.generateIsPresentList(this) 255 : THROWS.check(isPresent, 9, "Debugger.CallFrame"); 256 } 257 258 /** Creates an instance of this class from a {@link JsonObject}.*/ 259 public static CallFrame fromJSON(JsonObject jo) 260 { return singleton.fromJSON(jo); } 261 262 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 263 public static NestedDescriptor<CallFrame> descriptor() 264 { return singleton.descriptor(); } 265 } 266 267 /** 268 * Debug symbols available for a wasm script. 269 * 270 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI> 271 */ 272 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 273 public static class DebugSymbols 274 extends BaseType<DebugSymbols> 275 implements java.io.Serializable 276 { 277 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 278 protected static final long serialVersionUID = 1; 279 280 private static final NestedHelper<Debugger.DebugSymbols> singleton = 281 Torello.Browser.JavaScriptAPI.NestedHelpers.Types. 282 Debugger$$DebugSymbols$$.singleton; 283 284 /** 285 * Type of the debug symbols. 286 * <EMBED CLASS='external-html' DATA-D=Debugger DATA-C=DebugSymbols DATA-F=type DATA-FILE-ID=CDP.EL1> 287 * @see BaseType#enumStrList(String) 288 */ 289 public final String type; 290 291 /** 292 * URL of the external symbol source. 293 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 294 */ 295 public final String externalURL; 296 297 /** Constructor. Please review this class' fields for documentation. */ 298 public DebugSymbols(ReadOnlyList<Boolean> isPresent, String type, String externalURL) 299 { 300 super(singleton, Domains.Debugger, "DebugSymbols", 2); 301 302 this.type = type; 303 this.externalURL = externalURL; 304 305 this.isPresent = (isPresent == null) 306 ? singleton.generateIsPresentList(this) 307 : THROWS.check(isPresent, 2, "Debugger.DebugSymbols"); 308 } 309 310 /** Creates an instance of this class from a {@link JsonObject}.*/ 311 public static DebugSymbols fromJSON(JsonObject jo) 312 { return singleton.fromJSON(jo); } 313 314 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 315 public static NestedDescriptor<DebugSymbols> descriptor() 316 { return singleton.descriptor(); } 317 } 318 319 /** 320 * Location in the source code. 321 * 322 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI> 323 */ 324 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 325 public static class Location 326 extends BaseType<Location> 327 implements java.io.Serializable 328 { 329 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 330 protected static final long serialVersionUID = 1; 331 332 private static final NestedHelper<Debugger.Location> singleton = 333 Torello.Browser.JavaScriptAPI.NestedHelpers.Types. 334 Debugger$$Location$$.singleton; 335 336 /** Script identifier as reported in the <CODE>Debugger.scriptParsed</CODE>. */ 337 public final String scriptId; 338 339 /** Line number in the script (0-based). */ 340 public final int lineNumber; 341 342 /** 343 * Column number in the script (0-based). 344 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 345 */ 346 public final Integer columnNumber; 347 348 /** Constructor. Please review this class' fields for documentation. */ 349 public Location( 350 ReadOnlyList<Boolean> isPresent, String scriptId, int lineNumber, 351 Integer columnNumber 352 ) 353 { 354 super(singleton, Domains.Debugger, "Location", 3); 355 356 this.scriptId = scriptId; 357 this.lineNumber = lineNumber; 358 this.columnNumber = columnNumber; 359 360 this.isPresent = (isPresent == null) 361 ? singleton.generateIsPresentList(this) 362 : THROWS.check(isPresent, 3, "Debugger.Location"); 363 } 364 365 /** Creates an instance of this class from a {@link JsonObject}.*/ 366 public static Location fromJSON(JsonObject jo) 367 { return singleton.fromJSON(jo); } 368 369 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 370 public static NestedDescriptor<Location> descriptor() 371 { return singleton.descriptor(); } 372 } 373 374 /** 375 * Location range within one script. 376 * 377 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 378 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI> 379 */ 380 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 381 public static class LocationRange 382 extends BaseType<LocationRange> 383 implements java.io.Serializable 384 { 385 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 386 protected static final long serialVersionUID = 1; 387 388 private static final NestedHelper<Debugger.LocationRange> singleton = 389 Torello.Browser.JavaScriptAPI.NestedHelpers.Types. 390 Debugger$$LocationRange$$.singleton; 391 392 /** <CODE>[No Description Provided by Google]</CODE> */ 393 public final String scriptId; 394 395 /** <CODE>[No Description Provided by Google]</CODE> */ 396 public final Debugger.ScriptPosition start; 397 398 /** <CODE>[No Description Provided by Google]</CODE> */ 399 public final Debugger.ScriptPosition end; 400 401 /** Constructor. Please review this class' fields for documentation. */ 402 public LocationRange( 403 ReadOnlyList<Boolean> isPresent, String scriptId, ScriptPosition start, 404 ScriptPosition end 405 ) 406 { 407 super(singleton, Domains.Debugger, "LocationRange", 3); 408 409 this.scriptId = scriptId; 410 this.start = start; 411 this.end = end; 412 413 this.isPresent = (isPresent == null) 414 ? singleton.generateIsPresentList(this) 415 : THROWS.check(isPresent, 3, "Debugger.LocationRange"); 416 } 417 418 /** Creates an instance of this class from a {@link JsonObject}.*/ 419 public static LocationRange fromJSON(JsonObject jo) 420 { return singleton.fromJSON(jo); } 421 422 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 423 public static NestedDescriptor<LocationRange> descriptor() 424 { return singleton.descriptor(); } 425 } 426 427 /** 428 * <CODE>[No Description Provided by Google]</CODE> 429 * 430 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI> 431 */ 432 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 433 public static class ResolvedBreakpoint 434 extends BaseType<ResolvedBreakpoint> 435 implements java.io.Serializable 436 { 437 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 438 protected static final long serialVersionUID = 1; 439 440 private static final NestedHelper<Debugger.ResolvedBreakpoint> singleton = 441 Torello.Browser.JavaScriptAPI.NestedHelpers.Types. 442 Debugger$$ResolvedBreakpoint$$.singleton; 443 444 /** Breakpoint unique identifier. */ 445 public final String breakpointId; 446 447 /** Actual breakpoint location. */ 448 public final Debugger.Location location; 449 450 /** Constructor. Please review this class' fields for documentation. */ 451 public ResolvedBreakpoint 452 (ReadOnlyList<Boolean> isPresent, String breakpointId, Location location) 453 { 454 super(singleton, Domains.Debugger, "ResolvedBreakpoint", 2); 455 456 this.breakpointId = breakpointId; 457 this.location = location; 458 459 this.isPresent = (isPresent == null) 460 ? singleton.generateIsPresentList(this) 461 : THROWS.check(isPresent, 2, "Debugger.ResolvedBreakpoint"); 462 } 463 464 /** Creates an instance of this class from a {@link JsonObject}.*/ 465 public static ResolvedBreakpoint fromJSON(JsonObject jo) 466 { return singleton.fromJSON(jo); } 467 468 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 469 public static NestedDescriptor<ResolvedBreakpoint> descriptor() 470 { return singleton.descriptor(); } 471 } 472 473 /** 474 * Scope description. 475 * 476 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI> 477 */ 478 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 479 public static class Scope 480 extends BaseType<Scope> 481 implements java.io.Serializable 482 { 483 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 484 protected static final long serialVersionUID = 1; 485 486 private static final NestedHelper<Debugger.Scope> singleton = 487 Torello.Browser.JavaScriptAPI.NestedHelpers.Types. 488 Debugger$$Scope$$.singleton; 489 490 /** 491 * Scope type. 492 * <EMBED CLASS='external-html' DATA-D=Debugger DATA-C=Scope DATA-F=type DATA-FILE-ID=CDP.EL1> 493 * @see BaseType#enumStrList(String) 494 */ 495 public final String type; 496 497 /** 498 * Object representing the scope. For <CODE>global</CODE> and <CODE>with</CODE> scopes it represents the actual 499 * object; for the rest of the scopes, it is artificial transient object enumerating scope 500 * variables as its properties. 501 */ 502 public final RunTime.RemoteObject object; 503 504 /** 505 * <CODE>[No Description Provided by Google]</CODE> 506 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 507 */ 508 public final String name; 509 510 /** 511 * Location in the source code where scope starts 512 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 513 */ 514 public final Debugger.Location startLocation; 515 516 /** 517 * Location in the source code where scope ends 518 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 519 */ 520 public final Debugger.Location endLocation; 521 522 /** Constructor. Please review this class' fields for documentation. */ 523 public Scope( 524 ReadOnlyList<Boolean> isPresent, String type, RunTime.RemoteObject object, 525 String name, Location startLocation, Location endLocation 526 ) 527 { 528 super(singleton, Domains.Debugger, "Scope", 5); 529 530 this.type = type; 531 this.object = object; 532 this.name = name; 533 this.startLocation = startLocation; 534 this.endLocation = endLocation; 535 536 this.isPresent = (isPresent == null) 537 ? singleton.generateIsPresentList(this) 538 : THROWS.check(isPresent, 5, "Debugger.Scope"); 539 } 540 541 /** Creates an instance of this class from a {@link JsonObject}.*/ 542 public static Scope fromJSON(JsonObject jo) 543 { return singleton.fromJSON(jo); } 544 545 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 546 public static NestedDescriptor<Scope> descriptor() 547 { return singleton.descriptor(); } 548 } 549 550 /** 551 * Location in the source code. 552 * 553 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 554 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI> 555 */ 556 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 557 public static class ScriptPosition 558 extends BaseType<ScriptPosition> 559 implements java.io.Serializable 560 { 561 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 562 protected static final long serialVersionUID = 1; 563 564 private static final NestedHelper<Debugger.ScriptPosition> singleton = 565 Torello.Browser.JavaScriptAPI.NestedHelpers.Types. 566 Debugger$$ScriptPosition$$.singleton; 567 568 /** <CODE>[No Description Provided by Google]</CODE> */ 569 public final int lineNumber; 570 571 /** <CODE>[No Description Provided by Google]</CODE> */ 572 public final int columnNumber; 573 574 /** Constructor. Please review this class' fields for documentation. */ 575 public ScriptPosition(ReadOnlyList<Boolean> isPresent, int lineNumber, int columnNumber) 576 { 577 super(singleton, Domains.Debugger, "ScriptPosition", 2); 578 579 this.lineNumber = lineNumber; 580 this.columnNumber = columnNumber; 581 582 this.isPresent = (isPresent == null) 583 ? singleton.generateIsPresentList(this) 584 : THROWS.check(isPresent, 2, "Debugger.ScriptPosition"); 585 } 586 587 /** Creates an instance of this class from a {@link JsonObject}.*/ 588 public static ScriptPosition fromJSON(JsonObject jo) 589 { return singleton.fromJSON(jo); } 590 591 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 592 public static NestedDescriptor<ScriptPosition> descriptor() 593 { return singleton.descriptor(); } 594 } 595 596 /** 597 * Search match for resource. 598 * 599 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI> 600 */ 601 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 602 public static class SearchMatch 603 extends BaseType<SearchMatch> 604 implements java.io.Serializable 605 { 606 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 607 protected static final long serialVersionUID = 1; 608 609 private static final NestedHelper<Debugger.SearchMatch> singleton = 610 Torello.Browser.JavaScriptAPI.NestedHelpers.Types. 611 Debugger$$SearchMatch$$.singleton; 612 613 /** Line number in resource content. */ 614 public final Number lineNumber; 615 616 /** Line with match content. */ 617 public final String lineContent; 618 619 /** Constructor. Please review this class' fields for documentation. */ 620 public SearchMatch(ReadOnlyList<Boolean> isPresent, Number lineNumber, String lineContent) 621 { 622 super(singleton, Domains.Debugger, "SearchMatch", 2); 623 624 this.lineNumber = lineNumber; 625 this.lineContent = lineContent; 626 627 this.isPresent = (isPresent == null) 628 ? singleton.generateIsPresentList(this) 629 : THROWS.check(isPresent, 2, "Debugger.SearchMatch"); 630 } 631 632 /** Creates an instance of this class from a {@link JsonObject}.*/ 633 public static SearchMatch fromJSON(JsonObject jo) 634 { return singleton.fromJSON(jo); } 635 636 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 637 public static NestedDescriptor<SearchMatch> descriptor() 638 { return singleton.descriptor(); } 639 } 640 641 /** 642 * <CODE>[No Description Provided by Google]</CODE> 643 * 644 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 645 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI> 646 */ 647 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 648 public static class WasmDisassemblyChunk 649 extends BaseType<WasmDisassemblyChunk> 650 implements java.io.Serializable 651 { 652 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 653 protected static final long serialVersionUID = 1; 654 655 private static final NestedHelper<Debugger.WasmDisassemblyChunk> singleton = 656 Torello.Browser.JavaScriptAPI.NestedHelpers.Types. 657 Debugger$$WasmDisassemblyChunk$$.singleton; 658 659 /** The next chunk of disassembled lines. */ 660 public final String[] lines; 661 662 /** The bytecode offsets describing the start of each line. */ 663 public final int[] bytecodeOffsets; 664 665 /** Constructor. Please review this class' fields for documentation. */ 666 public WasmDisassemblyChunk 667 (ReadOnlyList<Boolean> isPresent, String[] lines, int[] bytecodeOffsets) 668 { 669 super(singleton, Domains.Debugger, "WasmDisassemblyChunk", 2); 670 671 this.lines = lines; 672 this.bytecodeOffsets = bytecodeOffsets; 673 674 this.isPresent = (isPresent == null) 675 ? singleton.generateIsPresentList(this) 676 : THROWS.check(isPresent, 2, "Debugger.WasmDisassemblyChunk"); 677 } 678 679 /** Creates an instance of this class from a {@link JsonObject}.*/ 680 public static WasmDisassemblyChunk fromJSON(JsonObject jo) 681 { return singleton.fromJSON(jo); } 682 683 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 684 public static NestedDescriptor<WasmDisassemblyChunk> descriptor() 685 { return singleton.descriptor(); } 686 } 687 688 689 // ******************************************************************************************** 690 // ******************************************************************************************** 691 // Command-Return Types 692 // ******************************************************************************************** 693 // ******************************************************************************************** 694 695 696 /** 697 * <CODE>[No Description Provided by Google]</CODE> 698 * 699 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 700 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI DATA-CMD=disassembleWasmModule> 701 * @see Debugger#disassembleWasmModule 702 */ 703 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI") 704 public static class disassembleWasmModule$$RET 705 extends BaseType<disassembleWasmModule$$RET> 706 implements java.io.Serializable 707 { 708 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 709 protected static final long serialVersionUID = 1; 710 711 private static final NestedHelper<Debugger.disassembleWasmModule$$RET> singleton = 712 Torello.Browser.JavaScriptAPI.NestedHelpers.CmdReturns. 713 Debugger$$disassembleWasmModule$$RET.singleton; 714 715 /** 716 * For large modules, return a stream from which additional chunks of 717 * disassembly can be read successively. 718 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 719 */ 720 public final String streamId; 721 722 /** The total number of lines in the disassembly text. */ 723 public final int totalNumberOfLines; 724 725 /** 726 * The offsets of all function bodies, in the format [start1, end1, 727 * start2, end2, ...] where all ends are exclusive. 728 */ 729 public final int[] functionBodyOffsets; 730 731 /** The first chunk of disassembly. */ 732 public final Debugger.WasmDisassemblyChunk chunk; 733 734 /** Constructor. Please review this class' fields for documentation. */ 735 public disassembleWasmModule$$RET( 736 ReadOnlyList<Boolean> isPresent, String streamId, int totalNumberOfLines, 737 int[] functionBodyOffsets, WasmDisassemblyChunk chunk 738 ) 739 { 740 super(singleton, Domains.Debugger, "disassembleWasmModule", 4); 741 742 this.streamId = streamId; 743 this.totalNumberOfLines = totalNumberOfLines; 744 this.functionBodyOffsets = functionBodyOffsets; 745 this.chunk = chunk; 746 747 this.isPresent = (isPresent == null) 748 ? singleton.generateIsPresentList(this) 749 : THROWS.check(isPresent, 4, "Debugger.disassembleWasmModule$$RET"); 750 } 751 752 /** Creates an instance of this class from a {@link JsonObject}.*/ 753 public static disassembleWasmModule$$RET fromJSON(JsonObject jo) 754 { return singleton.fromJSON(jo); } 755 756 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 757 public static NestedDescriptor<disassembleWasmModule$$RET> descriptor() 758 { return singleton.descriptor(); } 759 } 760 761 /** 762 * Evaluates expression on a given call frame. 763 * 764 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI DATA-CMD=evaluateOnCallFrame> 765 * @see Debugger#evaluateOnCallFrame 766 */ 767 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI") 768 public static class evaluateOnCallFrame$$RET 769 extends BaseType<evaluateOnCallFrame$$RET> 770 implements java.io.Serializable 771 { 772 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 773 protected static final long serialVersionUID = 1; 774 775 private static final NestedHelper<Debugger.evaluateOnCallFrame$$RET> singleton = 776 Torello.Browser.JavaScriptAPI.NestedHelpers.CmdReturns. 777 Debugger$$evaluateOnCallFrame$$RET.singleton; 778 779 /** Object wrapper for the evaluation result. */ 780 public final RunTime.RemoteObject result; 781 782 /** 783 * Exception details. 784 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 785 */ 786 public final RunTime.ExceptionDetails exceptionDetails; 787 788 /** Constructor. Please review this class' fields for documentation. */ 789 public evaluateOnCallFrame$$RET( 790 ReadOnlyList<Boolean> isPresent, RunTime.RemoteObject result, 791 RunTime.ExceptionDetails exceptionDetails 792 ) 793 { 794 super(singleton, Domains.Debugger, "evaluateOnCallFrame", 2); 795 796 this.result = result; 797 this.exceptionDetails = exceptionDetails; 798 799 this.isPresent = (isPresent == null) 800 ? singleton.generateIsPresentList(this) 801 : THROWS.check(isPresent, 2, "Debugger.evaluateOnCallFrame$$RET"); 802 } 803 804 /** Creates an instance of this class from a {@link JsonObject}.*/ 805 public static evaluateOnCallFrame$$RET fromJSON(JsonObject jo) 806 { return singleton.fromJSON(jo); } 807 808 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 809 public static NestedDescriptor<evaluateOnCallFrame$$RET> descriptor() 810 { return singleton.descriptor(); } 811 } 812 813 /** 814 * Returns source for the script with given id. 815 * 816 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI DATA-CMD=getScriptSource> 817 * @see Debugger#getScriptSource 818 */ 819 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI") 820 public static class getScriptSource$$RET 821 extends BaseType<getScriptSource$$RET> 822 implements java.io.Serializable 823 { 824 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 825 protected static final long serialVersionUID = 1; 826 827 private static final NestedHelper<Debugger.getScriptSource$$RET> singleton = 828 Torello.Browser.JavaScriptAPI.NestedHelpers.CmdReturns. 829 Debugger$$getScriptSource$$RET.singleton; 830 831 /** Script source (empty in case of Wasm bytecode). */ 832 public final String scriptSource; 833 834 /** 835 * Wasm bytecode. (Encoded as a base64 string when passed over JSON) 836 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 837 */ 838 public final String bytecode; 839 840 /** Constructor. Please review this class' fields for documentation. */ 841 public getScriptSource$$RET 842 (ReadOnlyList<Boolean> isPresent, String scriptSource, String bytecode) 843 { 844 super(singleton, Domains.Debugger, "getScriptSource", 2); 845 846 this.scriptSource = scriptSource; 847 this.bytecode = bytecode; 848 849 this.isPresent = (isPresent == null) 850 ? singleton.generateIsPresentList(this) 851 : THROWS.check(isPresent, 2, "Debugger.getScriptSource$$RET"); 852 } 853 854 /** Creates an instance of this class from a {@link JsonObject}.*/ 855 public static getScriptSource$$RET fromJSON(JsonObject jo) 856 { return singleton.fromJSON(jo); } 857 858 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 859 public static NestedDescriptor<getScriptSource$$RET> descriptor() 860 { return singleton.descriptor(); } 861 } 862 863 /** 864 * Restarts particular call frame from the beginning. The old, deprecated 865 * behavior of <CODE>restartFrame</CODE> is to stay paused and allow further CDP commands 866 * after a restart was scheduled. This can cause problems with restarting, so 867 * we now continue execution immediatly after it has been scheduled until we 868 * reach the beginning of the restarted frame. 869 * 870 * To stay back-wards compatible, <CODE>restartFrame</CODE> now expects a <CODE>mode</CODE> 871 * parameter to be present. If the <CODE>mode</CODE> parameter is missing, <CODE>restartFrame</CODE> 872 * errors out. 873 * 874 * The various return values are deprecated and <CODE>callFrames</CODE> is always empty. 875 * Use the call frames from the <CODE>Debugger#paused</CODE> events instead, that fires 876 * once V8 pauses at the beginning of the restarted function. 877 * 878 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI DATA-CMD=restartFrame> 879 * @see Debugger#restartFrame 880 */ 881 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI") 882 public static class restartFrame$$RET 883 extends BaseType<restartFrame$$RET> 884 implements java.io.Serializable 885 { 886 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 887 protected static final long serialVersionUID = 1; 888 889 private static final NestedHelper<Debugger.restartFrame$$RET> singleton = 890 Torello.Browser.JavaScriptAPI.NestedHelpers.CmdReturns. 891 Debugger$$restartFrame$$RET.singleton; 892 893 /** 894 * New stack trace. 895 * <BR /><B CLASS=Dep-Top>DEPRECATED</B> 896 */ 897 public final Debugger.CallFrame[] callFrames; 898 899 /** 900 * Async stack trace, if any. 901 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Dep-Top>DEPRECATED</B> 902 */ 903 public final RunTime.StackTrace asyncStackTrace; 904 905 /** 906 * Async stack trace, if any. 907 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Dep-Top>DEPRECATED</B> 908 */ 909 public final RunTime.StackTraceId asyncStackTraceId; 910 911 /** Constructor. Please review this class' fields for documentation. */ 912 public restartFrame$$RET( 913 ReadOnlyList<Boolean> isPresent, CallFrame[] callFrames, 914 RunTime.StackTrace asyncStackTrace, RunTime.StackTraceId asyncStackTraceId 915 ) 916 { 917 super(singleton, Domains.Debugger, "restartFrame", 3); 918 919 this.callFrames = callFrames; 920 this.asyncStackTrace = asyncStackTrace; 921 this.asyncStackTraceId = asyncStackTraceId; 922 923 this.isPresent = (isPresent == null) 924 ? singleton.generateIsPresentList(this) 925 : THROWS.check(isPresent, 3, "Debugger.restartFrame$$RET"); 926 } 927 928 /** Creates an instance of this class from a {@link JsonObject}.*/ 929 public static restartFrame$$RET fromJSON(JsonObject jo) 930 { return singleton.fromJSON(jo); } 931 932 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 933 public static NestedDescriptor<restartFrame$$RET> descriptor() 934 { return singleton.descriptor(); } 935 } 936 937 /** 938 * Sets JavaScript breakpoint at a given location. 939 * 940 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI DATA-CMD=setBreakpoint> 941 * @see Debugger#setBreakpoint 942 */ 943 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI") 944 public static class setBreakpoint$$RET 945 extends BaseType<setBreakpoint$$RET> 946 implements java.io.Serializable 947 { 948 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 949 protected static final long serialVersionUID = 1; 950 951 private static final NestedHelper<Debugger.setBreakpoint$$RET> singleton = 952 Torello.Browser.JavaScriptAPI.NestedHelpers.CmdReturns. 953 Debugger$$setBreakpoint$$RET.singleton; 954 955 /** Id of the created breakpoint for further reference. */ 956 public final String breakpointId; 957 958 /** Location this breakpoint resolved into. */ 959 public final Debugger.Location actualLocation; 960 961 /** Constructor. Please review this class' fields for documentation. */ 962 public setBreakpoint$$RET 963 (ReadOnlyList<Boolean> isPresent, String breakpointId, Location actualLocation) 964 { 965 super(singleton, Domains.Debugger, "setBreakpoint", 2); 966 967 this.breakpointId = breakpointId; 968 this.actualLocation = actualLocation; 969 970 this.isPresent = (isPresent == null) 971 ? singleton.generateIsPresentList(this) 972 : THROWS.check(isPresent, 2, "Debugger.setBreakpoint$$RET"); 973 } 974 975 /** Creates an instance of this class from a {@link JsonObject}.*/ 976 public static setBreakpoint$$RET fromJSON(JsonObject jo) 977 { return singleton.fromJSON(jo); } 978 979 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 980 public static NestedDescriptor<setBreakpoint$$RET> descriptor() 981 { return singleton.descriptor(); } 982 } 983 984 /** 985 * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this 986 * command is issued, all existing parsed scripts will have breakpoints resolved and returned in 987 * <CODE>locations</CODE> property. Further matching script parsing will result in subsequent 988 * <CODE>breakpointResolved</CODE> events issued. This logical breakpoint will survive page reloads. 989 * 990 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI DATA-CMD=setBreakpointByUrl> 991 * @see Debugger#setBreakpointByUrl 992 */ 993 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI") 994 public static class setBreakpointByUrl$$RET 995 extends BaseType<setBreakpointByUrl$$RET> 996 implements java.io.Serializable 997 { 998 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 999 protected static final long serialVersionUID = 1; 1000 1001 private static final NestedHelper<Debugger.setBreakpointByUrl$$RET> singleton = 1002 Torello.Browser.JavaScriptAPI.NestedHelpers.CmdReturns. 1003 Debugger$$setBreakpointByUrl$$RET.singleton; 1004 1005 /** Id of the created breakpoint for further reference. */ 1006 public final String breakpointId; 1007 1008 /** List of the locations this breakpoint resolved into upon addition. */ 1009 public final Debugger.Location[] locations; 1010 1011 /** Constructor. Please review this class' fields for documentation. */ 1012 public setBreakpointByUrl$$RET 1013 (ReadOnlyList<Boolean> isPresent, String breakpointId, Location[] locations) 1014 { 1015 super(singleton, Domains.Debugger, "setBreakpointByUrl", 2); 1016 1017 this.breakpointId = breakpointId; 1018 this.locations = locations; 1019 1020 this.isPresent = (isPresent == null) 1021 ? singleton.generateIsPresentList(this) 1022 : THROWS.check(isPresent, 2, "Debugger.setBreakpointByUrl$$RET"); 1023 } 1024 1025 /** Creates an instance of this class from a {@link JsonObject}.*/ 1026 public static setBreakpointByUrl$$RET fromJSON(JsonObject jo) 1027 { return singleton.fromJSON(jo); } 1028 1029 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1030 public static NestedDescriptor<setBreakpointByUrl$$RET> descriptor() 1031 { return singleton.descriptor(); } 1032 } 1033 1034 /** 1035 * Edits JavaScript source live. 1036 * 1037 * In general, functions that are currently on the stack can not be edited with 1038 * a single exception: If the edited function is the top-most stack frame and 1039 * that is the only activation of that function on the stack. In this case 1040 * the live edit will be successful and a <CODE>Debugger.restartFrame</CODE> for the 1041 * top-most function is automatically triggered. 1042 * 1043 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI DATA-CMD=setScriptSource> 1044 * @see Debugger#setScriptSource 1045 */ 1046 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI") 1047 public static class setScriptSource$$RET 1048 extends BaseType<setScriptSource$$RET> 1049 implements java.io.Serializable 1050 { 1051 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1052 protected static final long serialVersionUID = 1; 1053 1054 private static final NestedHelper<Debugger.setScriptSource$$RET> singleton = 1055 Torello.Browser.JavaScriptAPI.NestedHelpers.CmdReturns. 1056 Debugger$$setScriptSource$$RET.singleton; 1057 1058 /** 1059 * New stack trace in case editing has happened while VM was stopped. 1060 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Dep-Top>DEPRECATED</B> 1061 */ 1062 public final Debugger.CallFrame[] callFrames; 1063 1064 /** 1065 * Whether current call stack was modified after applying the changes. 1066 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Dep-Top>DEPRECATED</B> 1067 */ 1068 public final Boolean stackChanged; 1069 1070 /** 1071 * Async stack trace, if any. 1072 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Dep-Top>DEPRECATED</B> 1073 */ 1074 public final RunTime.StackTrace asyncStackTrace; 1075 1076 /** 1077 * Async stack trace, if any. 1078 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Dep-Top>DEPRECATED</B> 1079 */ 1080 public final RunTime.StackTraceId asyncStackTraceId; 1081 1082 /** 1083 * Whether the operation was successful or not. Only <CODE>Ok</CODE> denotes a 1084 * successful live edit while the other enum variants denote why 1085 * the live edit failed. 1086 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1087 * <EMBED CLASS='external-html' DATA-D=Debugger DATA-C=setScriptSource DATA-F=status DATA-FILE-ID=CDP.EL1> 1088 * @see BaseType#enumStrList(String) 1089 */ 1090 public final String status; 1091 1092 /** 1093 * Exception details if any. Only present when <CODE>status</CODE> is <CODE>CompileError</CODE>. 1094 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1095 */ 1096 public final RunTime.ExceptionDetails exceptionDetails; 1097 1098 /** Constructor. Please review this class' fields for documentation. */ 1099 public setScriptSource$$RET( 1100 ReadOnlyList<Boolean> isPresent, CallFrame[] callFrames, Boolean stackChanged, 1101 RunTime.StackTrace asyncStackTrace, RunTime.StackTraceId asyncStackTraceId, 1102 String status, RunTime.ExceptionDetails exceptionDetails 1103 ) 1104 { 1105 super(singleton, Domains.Debugger, "setScriptSource", 6); 1106 1107 this.callFrames = callFrames; 1108 this.stackChanged = stackChanged; 1109 this.asyncStackTrace = asyncStackTrace; 1110 this.asyncStackTraceId = asyncStackTraceId; 1111 this.status = status; 1112 this.exceptionDetails = exceptionDetails; 1113 1114 this.isPresent = (isPresent == null) 1115 ? singleton.generateIsPresentList(this) 1116 : THROWS.check(isPresent, 6, "Debugger.setScriptSource$$RET"); 1117 } 1118 1119 /** Creates an instance of this class from a {@link JsonObject}.*/ 1120 public static setScriptSource$$RET fromJSON(JsonObject jo) 1121 { return singleton.fromJSON(jo); } 1122 1123 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1124 public static NestedDescriptor<setScriptSource$$RET> descriptor() 1125 { return singleton.descriptor(); } 1126 } 1127 1128 1129 // ******************************************************************************************** 1130 // ******************************************************************************************** 1131 // Event Types 1132 // ******************************************************************************************** 1133 // ******************************************************************************************** 1134 1135 1136 /** 1137 * Fired when breakpoint is resolved to an actual script and location. 1138 * Deprecated in favor of <CODE>resolvedBreakpoints</CODE> in the <CODE>scriptParsed</CODE> event. 1139 * 1140 * <BR /><B CLASS=Dep-Top>DEPRECATED</B> 1141 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI> 1142 */ 1143 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 1144 public static class breakpointResolved 1145 extends BrowserEvent<breakpointResolved> 1146 implements java.io.Serializable 1147 { 1148 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1149 protected static final long serialVersionUID = 1; 1150 1151 private static final NestedHelper<Debugger.breakpointResolved> singleton = 1152 Torello.Browser.JavaScriptAPI.NestedHelpers.Events. 1153 Debugger$$breakpointResolved$$.singleton; 1154 1155 /** Breakpoint unique identifier. */ 1156 public final String breakpointId; 1157 1158 /** Actual breakpoint location. */ 1159 public final Debugger.Location location; 1160 1161 /** Constructor. Please review this class' fields for documentation. */ 1162 public breakpointResolved 1163 (ReadOnlyList<Boolean> isPresent, String breakpointId, Location location) 1164 { 1165 super(singleton, Domains.Debugger, "breakpointResolved", 2); 1166 1167 this.breakpointId = breakpointId; 1168 this.location = location; 1169 1170 this.isPresent = (isPresent == null) 1171 ? singleton.generateIsPresentList(this) 1172 : THROWS.check(isPresent, 2, "Debugger.breakpointResolved"); 1173 } 1174 1175 /** Creates an instance of this class from a {@link JsonObject}.*/ 1176 public static breakpointResolved fromJSON(JsonObject jo) 1177 { return singleton.fromJSON(jo); } 1178 1179 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1180 public static NestedDescriptor<breakpointResolved> descriptor() 1181 { return singleton.descriptor(); } 1182 } 1183 1184 /** 1185 * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. 1186 * 1187 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI> 1188 */ 1189 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 1190 public static class paused 1191 extends BrowserEvent<paused> 1192 implements java.io.Serializable 1193 { 1194 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1195 protected static final long serialVersionUID = 1; 1196 1197 private static final NestedHelper<Debugger.paused> singleton = 1198 Torello.Browser.JavaScriptAPI.NestedHelpers.Events. 1199 Debugger$$paused$$.singleton; 1200 1201 /** Call stack the virtual machine stopped on. */ 1202 public final Debugger.CallFrame[] callFrames; 1203 1204 /** 1205 * Pause reason. 1206 * <EMBED CLASS='external-html' DATA-D=Debugger DATA-C=paused DATA-F=reason DATA-FILE-ID=CDP.EL1> 1207 * @see BaseType#enumStrList(String) 1208 */ 1209 public final String reason; 1210 1211 /** 1212 * Object containing break-specific auxiliary properties. 1213 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1214 */ 1215 public final JsonValue data; 1216 1217 /** 1218 * Hit breakpoints IDs 1219 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1220 */ 1221 public final String[] hitBreakpoints; 1222 1223 /** 1224 * Async stack trace, if any. 1225 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1226 */ 1227 public final RunTime.StackTrace asyncStackTrace; 1228 1229 /** 1230 * Async stack trace, if any. 1231 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1232 */ 1233 public final RunTime.StackTraceId asyncStackTraceId; 1234 1235 /** 1236 * Never present, will be removed. 1237 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 1238 */ 1239 public final RunTime.StackTraceId asyncCallStackTraceId; 1240 1241 /** Constructor. Please review this class' fields for documentation. */ 1242 public paused( 1243 ReadOnlyList<Boolean> isPresent, CallFrame[] callFrames, String reason, 1244 JsonValue data, String[] hitBreakpoints, RunTime.StackTrace asyncStackTrace, 1245 RunTime.StackTraceId asyncStackTraceId, RunTime.StackTraceId asyncCallStackTraceId 1246 ) 1247 { 1248 super(singleton, Domains.Debugger, "paused", 7); 1249 1250 this.callFrames = callFrames; 1251 this.reason = reason; 1252 this.data = data; 1253 this.hitBreakpoints = hitBreakpoints; 1254 this.asyncStackTrace = asyncStackTrace; 1255 this.asyncStackTraceId = asyncStackTraceId; 1256 this.asyncCallStackTraceId = asyncCallStackTraceId; 1257 1258 this.isPresent = (isPresent == null) 1259 ? singleton.generateIsPresentList(this) 1260 : THROWS.check(isPresent, 7, "Debugger.paused"); 1261 } 1262 1263 /** Creates an instance of this class from a {@link JsonObject}.*/ 1264 public static paused fromJSON(JsonObject jo) 1265 { return singleton.fromJSON(jo); } 1266 1267 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1268 public static NestedDescriptor<paused> descriptor() 1269 { return singleton.descriptor(); } 1270 } 1271 1272 /** 1273 * Fired when virtual machine fails to parse the script. 1274 * 1275 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI> 1276 */ 1277 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 1278 public static class scriptFailedToParse 1279 extends BrowserEvent<scriptFailedToParse> 1280 implements java.io.Serializable 1281 { 1282 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1283 protected static final long serialVersionUID = 1; 1284 1285 private static final NestedHelper<Debugger.scriptFailedToParse> singleton = 1286 Torello.Browser.JavaScriptAPI.NestedHelpers.Events. 1287 Debugger$$scriptFailedToParse$$.singleton; 1288 1289 /** Identifier of the script parsed. */ 1290 public final String scriptId; 1291 1292 /** URL or name of the script parsed (if any). */ 1293 public final String url; 1294 1295 /** Line offset of the script within the resource with given URL (for script tags). */ 1296 public final int startLine; 1297 1298 /** Column offset of the script within the resource with given URL. */ 1299 public final int startColumn; 1300 1301 /** Last line of the script. */ 1302 public final int endLine; 1303 1304 /** Length of the last line of the script. */ 1305 public final int endColumn; 1306 1307 /** Specifies script creation context. */ 1308 public final int executionContextId; 1309 1310 /** Content hash of the script, SHA-256. */ 1311 public final String hash; 1312 1313 /** For Wasm modules, the content of the <CODE>build_id</CODE> custom section. For JavaScript the <CODE>debugId</CODE> magic comment. */ 1314 public final String buildId; 1315 1316 /** 1317 * Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} 1318 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1319 */ 1320 public final JsonValue executionContextAuxData; 1321 1322 /** 1323 * URL of source map associated with script (if any). 1324 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1325 */ 1326 public final String sourceMapURL; 1327 1328 /** 1329 * True, if this script has sourceURL. 1330 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1331 */ 1332 public final Boolean hasSourceURL; 1333 1334 /** 1335 * True, if this script is ES6 module. 1336 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1337 */ 1338 public final Boolean isModule; 1339 1340 /** 1341 * This script length. 1342 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1343 */ 1344 public final Integer length; 1345 1346 /** 1347 * JavaScript top stack frame of where the script parsed event was triggered if available. 1348 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1349 */ 1350 public final RunTime.StackTrace stackTrace; 1351 1352 /** 1353 * If the scriptLanguage is WebAssembly, the code section offset in the module. 1354 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1355 */ 1356 public final Integer codeOffset; 1357 1358 /** 1359 * The language of the script. 1360 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1361 * <EMBED CLASS='external-html' DATA-D=Debugger DATA-C=ScriptLanguage DATA-F=scriptLanguage DATA-FILE-ID=CDP.EL2> 1362 * @see BaseType#enumStrList(String) 1363 */ 1364 public final String scriptLanguage; 1365 1366 /** 1367 * The name the embedder supplied for this script. 1368 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1369 */ 1370 public final String embedderName; 1371 1372 /** Constructor. Please review this class' fields for documentation. */ 1373 public scriptFailedToParse( 1374 ReadOnlyList<Boolean> isPresent, String scriptId, String url, int startLine, 1375 int startColumn, int endLine, int endColumn, int executionContextId, String hash, 1376 String buildId, JsonValue executionContextAuxData, String sourceMapURL, 1377 Boolean hasSourceURL, Boolean isModule, Integer length, 1378 RunTime.StackTrace stackTrace, Integer codeOffset, String scriptLanguage, 1379 String embedderName 1380 ) 1381 { 1382 super(singleton, Domains.Debugger, "scriptFailedToParse", 18); 1383 1384 this.scriptId = scriptId; 1385 this.url = url; 1386 this.startLine = startLine; 1387 this.startColumn = startColumn; 1388 this.endLine = endLine; 1389 this.endColumn = endColumn; 1390 this.executionContextId = executionContextId; 1391 this.hash = hash; 1392 this.buildId = buildId; 1393 this.executionContextAuxData = executionContextAuxData; 1394 this.sourceMapURL = sourceMapURL; 1395 this.hasSourceURL = hasSourceURL; 1396 this.isModule = isModule; 1397 this.length = length; 1398 this.stackTrace = stackTrace; 1399 this.codeOffset = codeOffset; 1400 this.scriptLanguage = scriptLanguage; 1401 this.embedderName = embedderName; 1402 1403 this.isPresent = (isPresent == null) 1404 ? singleton.generateIsPresentList(this) 1405 : THROWS.check(isPresent, 18, "Debugger.scriptFailedToParse"); 1406 } 1407 1408 /** Creates an instance of this class from a {@link JsonObject}.*/ 1409 public static scriptFailedToParse fromJSON(JsonObject jo) 1410 { return singleton.fromJSON(jo); } 1411 1412 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1413 public static NestedDescriptor<scriptFailedToParse> descriptor() 1414 { return singleton.descriptor(); } 1415 } 1416 1417 /** 1418 * Fired when virtual machine parses script. This event is also fired for all known and uncollected 1419 * scripts upon enabling debugger. 1420 * 1421 * <EMBED CLASS=globalDefs DATA-DOMAIN=Debugger DATA-API=JavaScriptAPI> 1422 */ 1423 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 1424 public static class scriptParsed 1425 extends BrowserEvent<scriptParsed> 1426 implements java.io.Serializable 1427 { 1428 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1429 protected static final long serialVersionUID = 1; 1430 1431 private static final NestedHelper<Debugger.scriptParsed> singleton = 1432 Torello.Browser.JavaScriptAPI.NestedHelpers.Events. 1433 Debugger$$scriptParsed$$.singleton; 1434 1435 /** Identifier of the script parsed. */ 1436 public final String scriptId; 1437 1438 /** URL or name of the script parsed (if any). */ 1439 public final String url; 1440 1441 /** Line offset of the script within the resource with given URL (for script tags). */ 1442 public final int startLine; 1443 1444 /** Column offset of the script within the resource with given URL. */ 1445 public final int startColumn; 1446 1447 /** Last line of the script. */ 1448 public final int endLine; 1449 1450 /** Length of the last line of the script. */ 1451 public final int endColumn; 1452 1453 /** Specifies script creation context. */ 1454 public final int executionContextId; 1455 1456 /** Content hash of the script, SHA-256. */ 1457 public final String hash; 1458 1459 /** For Wasm modules, the content of the <CODE>build_id</CODE> custom section. For JavaScript the <CODE>debugId</CODE> magic comment. */ 1460 public final String buildId; 1461 1462 /** 1463 * Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} 1464 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1465 */ 1466 public final JsonValue executionContextAuxData; 1467 1468 /** 1469 * True, if this script is generated as a result of the live edit operation. 1470 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1471 */ 1472 public final Boolean isLiveEdit; 1473 1474 /** 1475 * URL of source map associated with script (if any). 1476 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1477 */ 1478 public final String sourceMapURL; 1479 1480 /** 1481 * True, if this script has sourceURL. 1482 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1483 */ 1484 public final Boolean hasSourceURL; 1485 1486 /** 1487 * True, if this script is ES6 module. 1488 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1489 */ 1490 public final Boolean isModule; 1491 1492 /** 1493 * This script length. 1494 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1495 */ 1496 public final Integer length; 1497 1498 /** 1499 * JavaScript top stack frame of where the script parsed event was triggered if available. 1500 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1501 */ 1502 public final RunTime.StackTrace stackTrace; 1503 1504 /** 1505 * If the scriptLanguage is WebAssembly, the code section offset in the module. 1506 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1507 */ 1508 public final Integer codeOffset; 1509 1510 /** 1511 * The language of the script. 1512 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1513 * <EMBED CLASS='external-html' DATA-D=Debugger DATA-C=ScriptLanguage DATA-F=scriptLanguage DATA-FILE-ID=CDP.EL2> 1514 * @see BaseType#enumStrList(String) 1515 */ 1516 public final String scriptLanguage; 1517 1518 /** 1519 * If the scriptLanguage is WebAssembly, the source of debug symbols for the module. 1520 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1521 */ 1522 public final Debugger.DebugSymbols[] debugSymbols; 1523 1524 /** 1525 * The name the embedder supplied for this script. 1526 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1527 */ 1528 public final String embedderName; 1529 1530 /** 1531 * The list of set breakpoints in this script if calls to <CODE>setBreakpointByUrl</CODE> 1532 * matches this script's URL or hash. Clients that use this list can ignore the 1533 * <CODE>breakpointResolved</CODE> event. They are equivalent. 1534 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1535 */ 1536 public final Debugger.ResolvedBreakpoint[] resolvedBreakpoints; 1537 1538 /** Constructor. Please review this class' fields for documentation. */ 1539 public scriptParsed( 1540 ReadOnlyList<Boolean> isPresent, String scriptId, String url, int startLine, 1541 int startColumn, int endLine, int endColumn, int executionContextId, String hash, 1542 String buildId, JsonValue executionContextAuxData, Boolean isLiveEdit, 1543 String sourceMapURL, Boolean hasSourceURL, Boolean isModule, Integer length, 1544 RunTime.StackTrace stackTrace, Integer codeOffset, String scriptLanguage, 1545 DebugSymbols[] debugSymbols, String embedderName, 1546 ResolvedBreakpoint[] resolvedBreakpoints 1547 ) 1548 { 1549 super(singleton, Domains.Debugger, "scriptParsed", 21); 1550 1551 this.scriptId = scriptId; 1552 this.url = url; 1553 this.startLine = startLine; 1554 this.startColumn = startColumn; 1555 this.endLine = endLine; 1556 this.endColumn = endColumn; 1557 this.executionContextId = executionContextId; 1558 this.hash = hash; 1559 this.buildId = buildId; 1560 this.executionContextAuxData = executionContextAuxData; 1561 this.isLiveEdit = isLiveEdit; 1562 this.sourceMapURL = sourceMapURL; 1563 this.hasSourceURL = hasSourceURL; 1564 this.isModule = isModule; 1565 this.length = length; 1566 this.stackTrace = stackTrace; 1567 this.codeOffset = codeOffset; 1568 this.scriptLanguage = scriptLanguage; 1569 this.debugSymbols = debugSymbols; 1570 this.embedderName = embedderName; 1571 this.resolvedBreakpoints = resolvedBreakpoints; 1572 1573 this.isPresent = (isPresent == null) 1574 ? singleton.generateIsPresentList(this) 1575 : THROWS.check(isPresent, 21, "Debugger.scriptParsed"); 1576 } 1577 1578 /** Creates an instance of this class from a {@link JsonObject}.*/ 1579 public static scriptParsed fromJSON(JsonObject jo) 1580 { return singleton.fromJSON(jo); } 1581 1582 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1583 public static NestedDescriptor<scriptParsed> descriptor() 1584 { return singleton.descriptor(); } 1585 } 1586 1587 1588 1589 1590 // ******************************************************************************************** 1591 // ******************************************************************************************** 1592 // Commands 1593 // ******************************************************************************************** 1594 // ******************************************************************************************** 1595 1596 1597 /** 1598 * Continues execution until specific location is reached. 1599 * 1600 * @param location Location to continue to. 1601 * 1602 * @param targetCallFrames - 1603 * <BR />Acceptable Values: ["any", "current"] 1604 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1605 * 1606 * @return An instance of <CODE>{@link Script}<Void></CODE> 1607 * 1608 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 1609 * browser receives the invocation-request. 1610 * 1611 * <BR /><BR /><DIV CLASS=JDHint> 1612 * This Browser-Function <I>does not have</I> a return-value. You may choose to 1613 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 1614 * the Browser Function has run to completion. 1615 * </DIV> 1616 */ 1617 public static Script<Void> continueToLocation(Location location, String targetCallFrames) 1618 { 1619 // Convert all Method Parameters into a JSON Request-Object (as a String) 1620 final String requestJSON = WriteJSON.get( 1621 Debugger$$Commands.continueToLocation$$, "Debugger.continueToLocation", 1622 location, targetCallFrames 1623 ); 1624 1625 return Script.NO_RET(Domains.Debugger, "continueToLocation", requestJSON); 1626 } 1627 1628 /** 1629 * Disables debugger for given page. 1630 * 1631 * @return An instance of <CODE>{@link Script}<Void></CODE> 1632 * 1633 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 1634 * browser receives the invocation-request. 1635 * 1636 * <BR /><BR /><DIV CLASS=JDHint> 1637 * This Browser-Function <I>does not have</I> a return-value. You may choose to 1638 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 1639 * the Browser Function has run to completion. 1640 * </DIV> 1641 */ 1642 public static Script<Void> disable() 1643 { 1644 // Ultra-Simple Request JSON - Because this method has no parameters 1645 final String requestJSON = "{\"method\":\"Debugger.disable\"}"; 1646 1647 return Script.NO_RET(Domains.Debugger, "disable", requestJSON); 1648 } 1649 1650 /** 1651 * <CODE>[No Description Provided by Google]</CODE> 1652 * 1653 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1654 * 1655 * @param scriptId Id of the script to disassemble 1656 * 1657 * @return An instance of <CODE>{@link Script}<{@link disassembleWasmModule$$RET}></CODE> 1658 * 1659 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 1660 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 1661 * <CODE><{@link disassembleWasmModule$$RET}></CODE> will be returned 1662 * 1663 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 1664 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 1665 * be retrieved.</I> 1666 * 1667 * <BR /><BR /><DIV CLASS=JDHint> 1668 * This Browser Function's {@code Promise} returns:{@link disassembleWasmModule$$RET} 1669 * A dedicated return type implies that the browser may return more than 1 datum 1670 * </DIV> 1671 */ 1672 public static Script<disassembleWasmModule$$RET> disassembleWasmModule(String scriptId) 1673 { 1674 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 1675 final String requestJSON = WriteJSON.get 1676 (CDPTypes.STRING, "scriptId", false, "Debugger.disassembleWasmModule", scriptId); 1677 1678 return new Script<>( 1679 Domains.Debugger, "disassembleWasmModule", requestJSON, 1680 disassembleWasmModule$$RET::fromJSON, 1681 disassembleWasmModule$$RET.class 1682 ); 1683 } 1684 1685 /** 1686 * Enables debugger for the given page. Clients should not assume that the debugging has been 1687 * enabled until the result for this command is received. 1688 * 1689 * @param maxScriptsCacheSize 1690 * The maximum size in bytes of collected scripts (not referenced by other heap objects) 1691 * the debugger can hold. Puts no limit if parameter is omitted. 1692 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1693 * 1694 * @return An instance of <CODE>{@link Script}<String></CODE> 1695 * 1696 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 1697 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 1698 * <CODE><String></CODE> will be returned 1699 * 1700 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 1701 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 1702 * be retrieved.</I> 1703 * 1704 * <BR /><BR /><DIV CLASS=JDHint> 1705 * This Browser Function's {@code Promise} returns: 1706 * <CODE>String (<B>debuggerId</B>)</CODE> 1707 * <BR /> 1708 * Unique identifier of the debugger. 1709 * </DIV> 1710 */ 1711 public static Script<String> enable(Number maxScriptsCacheSize) 1712 { 1713 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 1714 final String requestJSON = WriteJSON.get( 1715 CDPTypes.NUMBER, "maxScriptsCacheSize", true, "Debugger.enable", maxScriptsCacheSize 1716 ); 1717 1718 return new Script<>( 1719 Domains.Debugger, "enable", requestJSON, 1720 jo -> ReadJSON.getString(jo, "debuggerId", true, false), 1721 String.class 1722 ); 1723 } 1724 1725 /** 1726 * Evaluates expression on a given call frame. 1727 * 1728 * <BR /><BR /><DIV CLASS=JDHint> 1729 * 👍 Because of the sheer number of input parameters to this method, there is a 1730 * a {@link CommandBuilder} variant to this method which may be invoked instead. 1731 * 1732 * <BR /><BR /> 1733 * Please View: {@link #evaluateOnCallFrame()} 1734 * </DIV> 1735 * 1736 * @param callFrameId Call frame identifier to evaluate on. 1737 * 1738 * @param expression Expression to evaluate. 1739 * 1740 * @param objectGroup 1741 * String object group name to put result into (allows rapid releasing resulting object handles 1742 * using <CODE>releaseObjectGroup</CODE>). 1743 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1744 * 1745 * @param includeCommandLineAPI 1746 * Specifies whether command line API should be available to the evaluated expression, defaults 1747 * to false. 1748 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1749 * 1750 * @param silent 1751 * In silent mode exceptions thrown during evaluation are not reported and do not pause 1752 * execution. Overrides <CODE>setPauseOnException</CODE> state. 1753 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1754 * 1755 * @param returnByValue Whether the result is expected to be a JSON object that should be sent by value. 1756 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1757 * 1758 * @param generatePreview Whether preview should be generated for the result. 1759 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1760 * 1761 * @param throwOnSideEffect Whether to throw an exception if side effect cannot be ruled out during evaluation. 1762 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1763 * 1764 * @param timeout Terminate execution after timing out (number of milliseconds). 1765 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1766 * 1767 * @return An instance of <CODE>{@link Script}<{@link evaluateOnCallFrame$$RET}></CODE> 1768 * 1769 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 1770 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 1771 * <CODE><{@link evaluateOnCallFrame$$RET}></CODE> will be returned 1772 * 1773 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 1774 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 1775 * be retrieved.</I> 1776 * 1777 * <BR /><BR /><DIV CLASS=JDHint> 1778 * This Browser Function's {@code Promise} returns:{@link evaluateOnCallFrame$$RET} 1779 * A dedicated return type implies that the browser may return more than 1 datum 1780 * </DIV> 1781 */ 1782 public static Script<evaluateOnCallFrame$$RET> evaluateOnCallFrame( 1783 String callFrameId, String expression, String objectGroup, 1784 Boolean includeCommandLineAPI, Boolean silent, Boolean returnByValue, 1785 Boolean generatePreview, Boolean throwOnSideEffect, Number timeout 1786 ) 1787 { 1788 // Convert all Method Parameters into a JSON Request-Object (as a String) 1789 final String requestJSON = WriteJSON.get( 1790 Debugger$$Commands.evaluateOnCallFrame$$, "Debugger.evaluateOnCallFrame", 1791 callFrameId, expression, objectGroup, includeCommandLineAPI, silent, returnByValue, 1792 generatePreview, throwOnSideEffect, timeout 1793 ); 1794 1795 return new Script<>( 1796 Domains.Debugger, "evaluateOnCallFrame", requestJSON, 1797 evaluateOnCallFrame$$RET::fromJSON, 1798 evaluateOnCallFrame$$RET.class 1799 ); 1800 } 1801 1802 /** 1803 * Returns possible locations for breakpoint. scriptId in start and end range locations should be 1804 * the same. 1805 * 1806 * @param start Start of range to search possible breakpoint locations in. 1807 * 1808 * @param end 1809 * End of range to search possible breakpoint locations in (excluding). When not specified, end 1810 * of scripts is used as end of range. 1811 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1812 * 1813 * @param restrictToFunction Only consider locations which are in the same (non-nested) function as start. 1814 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1815 * 1816 * @return An instance of <CODE>{@link Script}<{@link Debugger.BreakLocation}[]></CODE> 1817 * 1818 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 1819 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 1820 * <CODE><{@link Debugger.BreakLocation}[]></CODE> will be returned 1821 * 1822 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 1823 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 1824 * be retrieved.</I> 1825 * 1826 * <BR /><BR /><DIV CLASS=JDHint> 1827 * This Browser Function's {@code Promise} returns: 1828 * <CODE>{@link Debugger.BreakLocation}[] (<B>locations</B>)</CODE> 1829 * <BR /> 1830 * List of the possible breakpoint locations. 1831 * </DIV> 1832 */ 1833 public static Script<Debugger.BreakLocation[]> getPossibleBreakpoints 1834 (Location start, Location end, Boolean restrictToFunction) 1835 { 1836 // Convert all Method Parameters into a JSON Request-Object (as a String) 1837 final String requestJSON = WriteJSON.get( 1838 Debugger$$Commands.getPossibleBreakpoints$$, "Debugger.getPossibleBreakpoints", 1839 start, end, restrictToFunction 1840 ); 1841 1842 return new Script<>( 1843 Domains.Debugger, "getPossibleBreakpoints", requestJSON, 1844 Debugger$$Commands::getPossibleBreakpoints, 1845 Debugger.BreakLocation[].class 1846 ); 1847 } 1848 1849 /** 1850 * Returns source for the script with given id. 1851 * 1852 * @param scriptId Id of the script to get source for. 1853 * 1854 * @return An instance of <CODE>{@link Script}<{@link getScriptSource$$RET}></CODE> 1855 * 1856 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 1857 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 1858 * <CODE><{@link getScriptSource$$RET}></CODE> will be returned 1859 * 1860 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 1861 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 1862 * be retrieved.</I> 1863 * 1864 * <BR /><BR /><DIV CLASS=JDHint> 1865 * This Browser Function's {@code Promise} returns:{@link getScriptSource$$RET} 1866 * A dedicated return type implies that the browser may return more than 1 datum 1867 * </DIV> 1868 */ 1869 public static Script<getScriptSource$$RET> getScriptSource(String scriptId) 1870 { 1871 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 1872 final String requestJSON = WriteJSON.get 1873 (CDPTypes.STRING, "scriptId", false, "Debugger.getScriptSource", scriptId); 1874 1875 return new Script<>( 1876 Domains.Debugger, "getScriptSource", requestJSON, 1877 getScriptSource$$RET::fromJSON, 1878 getScriptSource$$RET.class 1879 ); 1880 } 1881 1882 /** 1883 * Returns stack trace with given <CODE>stackTraceId</CODE>. 1884 * 1885 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1886 * 1887 * @param stackTraceId - 1888 * 1889 * @return An instance of <CODE>{@link Script}<{@link RunTime.StackTrace}></CODE> 1890 * 1891 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 1892 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 1893 * <CODE><{@link RunTime.StackTrace}></CODE> will be returned 1894 * 1895 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 1896 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 1897 * be retrieved.</I> 1898 * 1899 * <BR /><BR /><DIV CLASS=JDHint> 1900 * This Browser Function's {@code Promise} returns: 1901 * <CODE>{@link RunTime.StackTrace} (<B>stackTrace</B>)</CODE> 1902 * </DIV> 1903 */ 1904 public static Script<RunTime.StackTrace> getStackTrace(RunTime.StackTraceId stackTraceId) 1905 { 1906 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 1907 final String requestJSON = WriteJSON.get 1908 (CDPTypes.CDP_TYPE, "stackTraceId", false, "Debugger.getStackTrace", stackTraceId); 1909 1910 return new Script<>( 1911 Domains.Debugger, "getStackTrace", requestJSON, 1912 Debugger$$Commands::getStackTrace, 1913 RunTime.StackTrace.class 1914 ); 1915 } 1916 1917 /** 1918 * This command is deprecated. Use getScriptSource instead. 1919 * 1920 * <BR /><B CLASS=Dep-Top>DEPRECATED</B> 1921 * 1922 * @param scriptId Id of the Wasm script to get source for. 1923 * 1924 * @return An instance of <CODE>{@link Script}<String></CODE> 1925 * 1926 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 1927 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 1928 * <CODE><String></CODE> will be returned 1929 * 1930 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 1931 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 1932 * be retrieved.</I> 1933 * 1934 * <BR /><BR /><DIV CLASS=JDHint> 1935 * This Browser Function's {@code Promise} returns: 1936 * <CODE>String (<B>bytecode</B>)</CODE> 1937 * <BR /> 1938 * Script source. (Encoded as a base64 string when passed over JSON) 1939 * </DIV> 1940 */ 1941 public static Script<String> getWasmBytecode(String scriptId) 1942 { 1943 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 1944 final String requestJSON = WriteJSON.get 1945 (CDPTypes.STRING, "scriptId", false, "Debugger.getWasmBytecode", scriptId); 1946 1947 return new Script<>( 1948 Domains.Debugger, "getWasmBytecode", requestJSON, 1949 jo -> ReadJSON.getString(jo, "bytecode", true, false), 1950 String.class 1951 ); 1952 } 1953 1954 /** 1955 * Disassemble the next chunk of lines for the module corresponding to the 1956 * stream. If disassembly is complete, this API will invalidate the streamId 1957 * and return an empty chunk. Any subsequent calls for the now invalid stream 1958 * will return errors. 1959 * 1960 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1961 * 1962 * @param streamId - 1963 * 1964 * @return An instance of <CODE>{@link Script}<{@link Debugger.WasmDisassemblyChunk}></CODE> 1965 * 1966 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 1967 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 1968 * <CODE><{@link Debugger.WasmDisassemblyChunk}></CODE> will be returned 1969 * 1970 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 1971 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 1972 * be retrieved.</I> 1973 * 1974 * <BR /><BR /><DIV CLASS=JDHint> 1975 * This Browser Function's {@code Promise} returns: 1976 * <CODE>{@link Debugger.WasmDisassemblyChunk} (<B>chunk</B>)</CODE> 1977 * <BR /> 1978 * The next chunk of disassembly. 1979 * </DIV> 1980 */ 1981 public static Script<Debugger.WasmDisassemblyChunk> nextWasmDisassemblyChunk(String streamId) 1982 { 1983 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 1984 final String requestJSON = WriteJSON.get 1985 (CDPTypes.STRING, "streamId", false, "Debugger.nextWasmDisassemblyChunk", streamId); 1986 1987 return new Script<>( 1988 Domains.Debugger, "nextWasmDisassemblyChunk", requestJSON, 1989 Debugger$$Commands::nextWasmDisassemblyChunk, 1990 Debugger.WasmDisassemblyChunk.class 1991 ); 1992 } 1993 1994 /** 1995 * Stops on the next JavaScript statement. 1996 * 1997 * @return An instance of <CODE>{@link Script}<Void></CODE> 1998 * 1999 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2000 * browser receives the invocation-request. 2001 * 2002 * <BR /><BR /><DIV CLASS=JDHint> 2003 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2004 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2005 * the Browser Function has run to completion. 2006 * </DIV> 2007 */ 2008 public static Script<Void> pause() 2009 { 2010 // Ultra-Simple Request JSON - Because this method has no parameters 2011 final String requestJSON = "{\"method\":\"Debugger.pause\"}"; 2012 2013 return Script.NO_RET(Domains.Debugger, "pause", requestJSON); 2014 } 2015 2016 /** 2017 * <CODE>[No Description Provided by Google]</CODE> 2018 * 2019 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 2020 * 2021 * @param parentStackTraceId Debugger will pause when async call with given stack trace is started. 2022 * 2023 * @return An instance of <CODE>{@link Script}<Void></CODE> 2024 * 2025 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2026 * browser receives the invocation-request. 2027 * 2028 * <BR /><BR /><DIV CLASS=JDHint> 2029 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2030 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2031 * the Browser Function has run to completion. 2032 * </DIV> 2033 */ 2034 public static Script<Void> pauseOnAsyncCall(RunTime.StackTraceId parentStackTraceId) 2035 { 2036 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 2037 final String requestJSON = WriteJSON.get( 2038 CDPTypes.CDP_TYPE, "parentStackTraceId", false, "Debugger.pauseOnAsyncCall", 2039 parentStackTraceId 2040 ); 2041 2042 return Script.NO_RET(Domains.Debugger, "pauseOnAsyncCall", requestJSON); 2043 } 2044 2045 /** 2046 * Removes JavaScript breakpoint. 2047 * 2048 * @param breakpointId - 2049 * 2050 * @return An instance of <CODE>{@link Script}<Void></CODE> 2051 * 2052 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2053 * browser receives the invocation-request. 2054 * 2055 * <BR /><BR /><DIV CLASS=JDHint> 2056 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2057 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2058 * the Browser Function has run to completion. 2059 * </DIV> 2060 */ 2061 public static Script<Void> removeBreakpoint(String breakpointId) 2062 { 2063 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 2064 final String requestJSON = WriteJSON.get 2065 (CDPTypes.STRING, "breakpointId", false, "Debugger.removeBreakpoint", breakpointId); 2066 2067 return Script.NO_RET(Domains.Debugger, "removeBreakpoint", requestJSON); 2068 } 2069 2070 /** 2071 * Restarts particular call frame from the beginning. The old, deprecated 2072 * behavior of <CODE>restartFrame</CODE> is to stay paused and allow further CDP commands 2073 * after a restart was scheduled. This can cause problems with restarting, so 2074 * we now continue execution immediatly after it has been scheduled until we 2075 * reach the beginning of the restarted frame. 2076 * 2077 * To stay back-wards compatible, <CODE>restartFrame</CODE> now expects a <CODE>mode</CODE> 2078 * parameter to be present. If the <CODE>mode</CODE> parameter is missing, <CODE>restartFrame</CODE> 2079 * errors out. 2080 * 2081 * The various return values are deprecated and <CODE>callFrames</CODE> is always empty. 2082 * Use the call frames from the <CODE>Debugger#paused</CODE> events instead, that fires 2083 * once V8 pauses at the beginning of the restarted function. 2084 * 2085 * @param callFrameId Call frame identifier to evaluate on. 2086 * 2087 * @param mode 2088 * The <CODE>mode</CODE> parameter must be present and set to 'StepInto', otherwise 2089 * <CODE>restartFrame</CODE> will error out. 2090 * <BR />Acceptable Values: ["StepInto"] 2091 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 2092 * 2093 * @return An instance of <CODE>{@link Script}<{@link restartFrame$$RET}></CODE> 2094 * 2095 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 2096 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 2097 * <CODE><{@link restartFrame$$RET}></CODE> will be returned 2098 * 2099 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 2100 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 2101 * be retrieved.</I> 2102 * 2103 * <BR /><BR /><DIV CLASS=JDHint> 2104 * This Browser Function's {@code Promise} returns:{@link restartFrame$$RET} 2105 * A dedicated return type implies that the browser may return more than 1 datum 2106 * </DIV> 2107 */ 2108 public static Script<restartFrame$$RET> restartFrame(String callFrameId, String mode) 2109 { 2110 // Convert all Method Parameters into a JSON Request-Object (as a String) 2111 final String requestJSON = WriteJSON.get( 2112 Debugger$$Commands.restartFrame$$, "Debugger.restartFrame", 2113 callFrameId, mode 2114 ); 2115 2116 return new Script<>( 2117 Domains.Debugger, "restartFrame", requestJSON, 2118 restartFrame$$RET::fromJSON, 2119 restartFrame$$RET.class 2120 ); 2121 } 2122 2123 /** 2124 * Resumes JavaScript execution. 2125 * 2126 * @param terminateOnResume 2127 * Set to true to terminate execution upon resuming execution. In contrast 2128 * to RunTime.terminateExecution, this will allows to execute further 2129 * JavaScript (i.e. via evaluation) until execution of the paused code 2130 * is actually resumed, at which point termination is triggered. 2131 * If execution is currently not paused, this parameter has no effect. 2132 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2133 * 2134 * @return An instance of <CODE>{@link Script}<Void></CODE> 2135 * 2136 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2137 * browser receives the invocation-request. 2138 * 2139 * <BR /><BR /><DIV CLASS=JDHint> 2140 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2141 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2142 * the Browser Function has run to completion. 2143 * </DIV> 2144 */ 2145 public static Script<Void> resume(Boolean terminateOnResume) 2146 { 2147 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 2148 final String requestJSON = WriteJSON.get( 2149 CDPTypes.BOXED_BOOLEAN, "terminateOnResume", true, "Debugger.resume", 2150 terminateOnResume 2151 ); 2152 2153 return Script.NO_RET(Domains.Debugger, "resume", requestJSON); 2154 } 2155 2156 /** 2157 * Searches for given string in script content. 2158 * 2159 * @param scriptId Id of the script to search in. 2160 * 2161 * @param query String to search for. 2162 * 2163 * @param caseSensitive If true, search is case sensitive. 2164 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2165 * 2166 * @param isRegex If true, treats string parameter as regex. 2167 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2168 * 2169 * @return An instance of <CODE>{@link Script}<{@link Debugger.SearchMatch}[]></CODE> 2170 * 2171 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 2172 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 2173 * <CODE><{@link Debugger.SearchMatch}[]></CODE> will be returned 2174 * 2175 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 2176 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 2177 * be retrieved.</I> 2178 * 2179 * <BR /><BR /><DIV CLASS=JDHint> 2180 * This Browser Function's {@code Promise} returns: 2181 * <CODE>{@link Debugger.SearchMatch}[] (<B>result</B>)</CODE> 2182 * <BR /> 2183 * List of search matches. 2184 * </DIV> 2185 */ 2186 public static Script<Debugger.SearchMatch[]> searchInContent 2187 (String scriptId, String query, Boolean caseSensitive, Boolean isRegex) 2188 { 2189 // Convert all Method Parameters into a JSON Request-Object (as a String) 2190 final String requestJSON = WriteJSON.get( 2191 Debugger$$Commands.searchInContent$$, "Debugger.searchInContent", 2192 scriptId, query, caseSensitive, isRegex 2193 ); 2194 2195 return new Script<>( 2196 Domains.Debugger, "searchInContent", requestJSON, 2197 Debugger$$Commands::searchInContent, 2198 Debugger.SearchMatch[].class 2199 ); 2200 } 2201 2202 /** 2203 * Enables or disables async call stacks tracking. 2204 * 2205 * @param maxDepth 2206 * Maximum depth of async call stacks. Setting to <CODE>0</CODE> will effectively disable collecting async 2207 * call stacks (default). 2208 * 2209 * @return An instance of <CODE>{@link Script}<Void></CODE> 2210 * 2211 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2212 * browser receives the invocation-request. 2213 * 2214 * <BR /><BR /><DIV CLASS=JDHint> 2215 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2216 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2217 * the Browser Function has run to completion. 2218 * </DIV> 2219 */ 2220 public static Script<Void> setAsyncCallStackDepth(int maxDepth) 2221 { 2222 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 2223 final String requestJSON = WriteJSON.get( 2224 CDPTypes.PRIMITIVE_INT, "maxDepth", false, "Debugger.setAsyncCallStackDepth", 2225 maxDepth 2226 ); 2227 2228 return Script.NO_RET(Domains.Debugger, "setAsyncCallStackDepth", requestJSON); 2229 } 2230 2231 /** 2232 * Replace previous blackbox execution contexts with passed ones. Forces backend to skip 2233 * stepping/pausing in scripts in these execution contexts. VM will try to leave blackboxed script by 2234 * performing 'step in' several times, finally resorting to 'step out' if unsuccessful. 2235 * 2236 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2237 * 2238 * @param uniqueIds Array of execution context unique ids for the debugger to ignore. 2239 * 2240 * @return An instance of <CODE>{@link Script}<Void></CODE> 2241 * 2242 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2243 * browser receives the invocation-request. 2244 * 2245 * <BR /><BR /><DIV CLASS=JDHint> 2246 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2247 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2248 * the Browser Function has run to completion. 2249 * </DIV> 2250 */ 2251 public static Script<Void> setBlackboxExecutionContexts(String[] uniqueIds) 2252 { 2253 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 2254 final String requestJSON = WriteJSON.get( 2255 CDPTypes.STRING_ARRAY_1D, "uniqueIds", false, 2256 "Debugger.setBlackboxExecutionContexts", (Object) uniqueIds 2257 ); 2258 2259 return Script.NO_RET(Domains.Debugger, "setBlackboxExecutionContexts", requestJSON); 2260 } 2261 2262 /** 2263 * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in 2264 * scripts with url matching one of the patterns. VM will try to leave blackboxed script by 2265 * performing 'step in' several times, finally resorting to 'step out' if unsuccessful. 2266 * 2267 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2268 * 2269 * @param patterns Array of regexps that will be used to check script url for blackbox state. 2270 * 2271 * @param skipAnonymous If true, also ignore scripts with no source url. 2272 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2273 * 2274 * @return An instance of <CODE>{@link Script}<Void></CODE> 2275 * 2276 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2277 * browser receives the invocation-request. 2278 * 2279 * <BR /><BR /><DIV CLASS=JDHint> 2280 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2281 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2282 * the Browser Function has run to completion. 2283 * </DIV> 2284 */ 2285 public static Script<Void> setBlackboxPatterns(String[] patterns, Boolean skipAnonymous) 2286 { 2287 // Convert all Method Parameters into a JSON Request-Object (as a String) 2288 final String requestJSON = WriteJSON.get( 2289 Debugger$$Commands.setBlackboxPatterns$$, "Debugger.setBlackboxPatterns", 2290 patterns, skipAnonymous 2291 ); 2292 2293 return Script.NO_RET(Domains.Debugger, "setBlackboxPatterns", requestJSON); 2294 } 2295 2296 /** 2297 * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted 2298 * scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. 2299 * Positions array contains positions where blackbox state is changed. First interval isn't 2300 * blackboxed. Array should be sorted. 2301 * 2302 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2303 * 2304 * @param scriptId Id of the script. 2305 * 2306 * @param positions - 2307 * 2308 * @return An instance of <CODE>{@link Script}<Void></CODE> 2309 * 2310 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2311 * browser receives the invocation-request. 2312 * 2313 * <BR /><BR /><DIV CLASS=JDHint> 2314 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2315 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2316 * the Browser Function has run to completion. 2317 * </DIV> 2318 */ 2319 public static Script<Void> setBlackboxedRanges(String scriptId, ScriptPosition[] positions) 2320 { 2321 // Convert all Method Parameters into a JSON Request-Object (as a String) 2322 final String requestJSON = WriteJSON.get( 2323 Debugger$$Commands.setBlackboxedRanges$$, "Debugger.setBlackboxedRanges", 2324 scriptId, positions 2325 ); 2326 2327 return Script.NO_RET(Domains.Debugger, "setBlackboxedRanges", requestJSON); 2328 } 2329 2330 /** 2331 * Sets JavaScript breakpoint at a given location. 2332 * 2333 * @param location Location to set breakpoint in. 2334 * 2335 * @param condition 2336 * Expression to use as a breakpoint condition. When specified, debugger will only stop on the 2337 * breakpoint if this expression evaluates to true. 2338 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2339 * 2340 * @return An instance of <CODE>{@link Script}<{@link setBreakpoint$$RET}></CODE> 2341 * 2342 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 2343 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 2344 * <CODE><{@link setBreakpoint$$RET}></CODE> will be returned 2345 * 2346 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 2347 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 2348 * be retrieved.</I> 2349 * 2350 * <BR /><BR /><DIV CLASS=JDHint> 2351 * This Browser Function's {@code Promise} returns:{@link setBreakpoint$$RET} 2352 * A dedicated return type implies that the browser may return more than 1 datum 2353 * </DIV> 2354 */ 2355 public static Script<setBreakpoint$$RET> setBreakpoint(Location location, String condition) 2356 { 2357 // Convert all Method Parameters into a JSON Request-Object (as a String) 2358 final String requestJSON = WriteJSON.get( 2359 Debugger$$Commands.setBreakpoint$$, "Debugger.setBreakpoint", 2360 location, condition 2361 ); 2362 2363 return new Script<>( 2364 Domains.Debugger, "setBreakpoint", requestJSON, 2365 setBreakpoint$$RET::fromJSON, 2366 setBreakpoint$$RET.class 2367 ); 2368 } 2369 2370 /** 2371 * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this 2372 * command is issued, all existing parsed scripts will have breakpoints resolved and returned in 2373 * <CODE>locations</CODE> property. Further matching script parsing will result in subsequent 2374 * <CODE>breakpointResolved</CODE> events issued. This logical breakpoint will survive page reloads. 2375 * 2376 * <BR /><BR /><DIV CLASS=JDHint> 2377 * 👍 Because of the sheer number of input parameters to this method, there is a 2378 * a {@link CommandBuilder} variant to this method which may be invoked instead. 2379 * 2380 * <BR /><BR /> 2381 * Please View: {@link #setBreakpointByUrl()} 2382 * </DIV> 2383 * 2384 * @param lineNumber Line number to set breakpoint at. 2385 * 2386 * @param url URL of the resources to set breakpoint on. 2387 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2388 * 2389 * @param urlRegex 2390 * Regex pattern for the URLs of the resources to set breakpoints on. Either <CODE>url</CODE> or 2391 * <CODE>urlRegex</CODE> must be specified. 2392 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2393 * 2394 * @param scriptHash Script hash of the resources to set breakpoint on. 2395 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2396 * 2397 * @param columnNumber Offset in the line to set breakpoint at. 2398 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2399 * 2400 * @param condition 2401 * Expression to use as a breakpoint condition. When specified, debugger will only stop on the 2402 * breakpoint if this expression evaluates to true. 2403 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2404 * 2405 * @return An instance of <CODE>{@link Script}<{@link setBreakpointByUrl$$RET}></CODE> 2406 * 2407 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 2408 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 2409 * <CODE><{@link setBreakpointByUrl$$RET}></CODE> will be returned 2410 * 2411 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 2412 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 2413 * be retrieved.</I> 2414 * 2415 * <BR /><BR /><DIV CLASS=JDHint> 2416 * This Browser Function's {@code Promise} returns:{@link setBreakpointByUrl$$RET} 2417 * A dedicated return type implies that the browser may return more than 1 datum 2418 * </DIV> 2419 */ 2420 public static Script<setBreakpointByUrl$$RET> setBreakpointByUrl( 2421 int lineNumber, String url, String urlRegex, String scriptHash, Integer columnNumber, 2422 String condition 2423 ) 2424 { 2425 // Convert all Method Parameters into a JSON Request-Object (as a String) 2426 final String requestJSON = WriteJSON.get( 2427 Debugger$$Commands.setBreakpointByUrl$$, "Debugger.setBreakpointByUrl", 2428 lineNumber, url, urlRegex, scriptHash, columnNumber, condition 2429 ); 2430 2431 return new Script<>( 2432 Domains.Debugger, "setBreakpointByUrl", requestJSON, 2433 setBreakpointByUrl$$RET::fromJSON, 2434 setBreakpointByUrl$$RET.class 2435 ); 2436 } 2437 2438 /** 2439 * Sets JavaScript breakpoint before each call to the given function. 2440 * If another function was created from the same source as a given one, 2441 * calling it will also trigger the breakpoint. 2442 * 2443 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2444 * 2445 * @param objectId Function object id. 2446 * 2447 * @param condition 2448 * Expression to use as a breakpoint condition. When specified, debugger will 2449 * stop on the breakpoint if this expression evaluates to true. 2450 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2451 * 2452 * @return An instance of <CODE>{@link Script}<String></CODE> 2453 * 2454 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 2455 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 2456 * <CODE><String></CODE> will be returned 2457 * 2458 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 2459 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 2460 * be retrieved.</I> 2461 * 2462 * <BR /><BR /><DIV CLASS=JDHint> 2463 * This Browser Function's {@code Promise} returns: 2464 * <CODE>String (<B>breakpointId</B>)</CODE> 2465 * <BR /> 2466 * Id of the created breakpoint for further reference. 2467 * </DIV> 2468 */ 2469 public static Script<String> setBreakpointOnFunctionCall(String objectId, String condition) 2470 { 2471 // Convert all Method Parameters into a JSON Request-Object (as a String) 2472 final String requestJSON = WriteJSON.get( 2473 Debugger$$Commands.setBreakpointOnFunctionCall$$, 2474 "Debugger.setBreakpointOnFunctionCall", 2475 objectId, condition 2476 ); 2477 2478 return new Script<>( 2479 Domains.Debugger, "setBreakpointOnFunctionCall", requestJSON, 2480 jo -> ReadJSON.getString(jo, "breakpointId", true, false), 2481 String.class 2482 ); 2483 } 2484 2485 /** 2486 * Activates / deactivates all breakpoints on the page. 2487 * 2488 * @param active New value for breakpoints active state. 2489 * 2490 * @return An instance of <CODE>{@link Script}<Void></CODE> 2491 * 2492 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2493 * browser receives the invocation-request. 2494 * 2495 * <BR /><BR /><DIV CLASS=JDHint> 2496 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2497 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2498 * the Browser Function has run to completion. 2499 * </DIV> 2500 */ 2501 public static Script<Void> setBreakpointsActive(boolean active) 2502 { 2503 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 2504 final String requestJSON = WriteJSON.get( 2505 CDPTypes.PRIMITIVE_BOOLEAN, "active", false, "Debugger.setBreakpointsActive", active 2506 ); 2507 2508 return Script.NO_RET(Domains.Debugger, "setBreakpointsActive", requestJSON); 2509 } 2510 2511 /** 2512 * Sets instrumentation breakpoint. 2513 * 2514 * @param instrumentation Instrumentation name. 2515 * <BR />Acceptable Values: ["beforeScriptExecution", "beforeScriptWithSourceMapExecution"] 2516 * 2517 * @return An instance of <CODE>{@link Script}<String></CODE> 2518 * 2519 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 2520 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 2521 * <CODE><String></CODE> will be returned 2522 * 2523 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 2524 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 2525 * be retrieved.</I> 2526 * 2527 * <BR /><BR /><DIV CLASS=JDHint> 2528 * This Browser Function's {@code Promise} returns: 2529 * <CODE>String (<B>breakpointId</B>)</CODE> 2530 * <BR /> 2531 * Id of the created breakpoint for further reference. 2532 * </DIV> 2533 */ 2534 public static Script<String> setInstrumentationBreakpoint(String instrumentation) 2535 { 2536 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 2537 final String requestJSON = WriteJSON.get( 2538 CDPTypes.STRING, "instrumentation", false, "Debugger.setInstrumentationBreakpoint", 2539 instrumentation 2540 ); 2541 2542 return new Script<>( 2543 Domains.Debugger, "setInstrumentationBreakpoint", requestJSON, 2544 jo -> ReadJSON.getString(jo, "breakpointId", true, false), 2545 String.class 2546 ); 2547 } 2548 2549 /** 2550 * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions, 2551 * or caught exceptions, no exceptions. Initial pause on exceptions state is <CODE>none</CODE>. 2552 * 2553 * @param state Pause on exceptions mode. 2554 * <BR />Acceptable Values: ["all", "caught", "none", "uncaught"] 2555 * 2556 * @return An instance of <CODE>{@link Script}<Void></CODE> 2557 * 2558 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2559 * browser receives the invocation-request. 2560 * 2561 * <BR /><BR /><DIV CLASS=JDHint> 2562 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2563 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2564 * the Browser Function has run to completion. 2565 * </DIV> 2566 */ 2567 public static Script<Void> setPauseOnExceptions(String state) 2568 { 2569 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 2570 final String requestJSON = WriteJSON.get 2571 (CDPTypes.STRING, "state", false, "Debugger.setPauseOnExceptions", state); 2572 2573 return Script.NO_RET(Domains.Debugger, "setPauseOnExceptions", requestJSON); 2574 } 2575 2576 /** 2577 * Changes return value in top frame. Available only at return break position. 2578 * 2579 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2580 * 2581 * @param newValue New return value. 2582 * 2583 * @return An instance of <CODE>{@link Script}<Void></CODE> 2584 * 2585 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2586 * browser receives the invocation-request. 2587 * 2588 * <BR /><BR /><DIV CLASS=JDHint> 2589 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2590 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2591 * the Browser Function has run to completion. 2592 * </DIV> 2593 */ 2594 public static Script<Void> setReturnValue(RunTime.CallArgument newValue) 2595 { 2596 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 2597 final String requestJSON = WriteJSON.get 2598 (CDPTypes.CDP_TYPE, "newValue", false, "Debugger.setReturnValue", newValue); 2599 2600 return Script.NO_RET(Domains.Debugger, "setReturnValue", requestJSON); 2601 } 2602 2603 /** 2604 * Edits JavaScript source live. 2605 * 2606 * In general, functions that are currently on the stack can not be edited with 2607 * a single exception: If the edited function is the top-most stack frame and 2608 * that is the only activation of that function on the stack. In this case 2609 * the live edit will be successful and a <CODE>Debugger.restartFrame</CODE> for the 2610 * top-most function is automatically triggered. 2611 * 2612 * @param scriptId Id of the script to edit. 2613 * 2614 * @param scriptSource New content of the script. 2615 * 2616 * @param dryRun 2617 * If true the change will not actually be applied. Dry run may be used to get result 2618 * description without actually modifying the code. 2619 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2620 * 2621 * @param allowTopFrameEditing 2622 * If true, then <CODE>scriptSource</CODE> is allowed to change the function on top of the stack 2623 * as long as the top-most stack frame is the only activation of that function. 2624 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 2625 * 2626 * @return An instance of <CODE>{@link Script}<{@link setScriptSource$$RET}></CODE> 2627 * 2628 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 2629 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 2630 * <CODE><{@link setScriptSource$$RET}></CODE> will be returned 2631 * 2632 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 2633 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 2634 * be retrieved.</I> 2635 * 2636 * <BR /><BR /><DIV CLASS=JDHint> 2637 * This Browser Function's {@code Promise} returns:{@link setScriptSource$$RET} 2638 * A dedicated return type implies that the browser may return more than 1 datum 2639 * </DIV> 2640 */ 2641 public static Script<setScriptSource$$RET> setScriptSource 2642 (String scriptId, String scriptSource, Boolean dryRun, Boolean allowTopFrameEditing) 2643 { 2644 // Convert all Method Parameters into a JSON Request-Object (as a String) 2645 final String requestJSON = WriteJSON.get( 2646 Debugger$$Commands.setScriptSource$$, "Debugger.setScriptSource", 2647 scriptId, scriptSource, dryRun, allowTopFrameEditing 2648 ); 2649 2650 return new Script<>( 2651 Domains.Debugger, "setScriptSource", requestJSON, 2652 setScriptSource$$RET::fromJSON, 2653 setScriptSource$$RET.class 2654 ); 2655 } 2656 2657 /** 2658 * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). 2659 * 2660 * @param skip New value for skip pauses state. 2661 * 2662 * @return An instance of <CODE>{@link Script}<Void></CODE> 2663 * 2664 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2665 * browser receives the invocation-request. 2666 * 2667 * <BR /><BR /><DIV CLASS=JDHint> 2668 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2669 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2670 * the Browser Function has run to completion. 2671 * </DIV> 2672 */ 2673 public static Script<Void> setSkipAllPauses(boolean skip) 2674 { 2675 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 2676 final String requestJSON = WriteJSON.get 2677 (CDPTypes.PRIMITIVE_BOOLEAN, "skip", false, "Debugger.setSkipAllPauses", skip); 2678 2679 return Script.NO_RET(Domains.Debugger, "setSkipAllPauses", requestJSON); 2680 } 2681 2682 /** 2683 * Changes value of variable in a callframe. Object-based scopes are not supported and must be 2684 * mutated manually. 2685 * 2686 * @param scopeNumber 2687 * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' 2688 * scope types are allowed. Other scopes could be manipulated manually. 2689 * 2690 * @param variableName Variable name. 2691 * 2692 * @param newValue New variable value. 2693 * 2694 * @param callFrameId Id of callframe that holds variable. 2695 * 2696 * @return An instance of <CODE>{@link Script}<Void></CODE> 2697 * 2698 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2699 * browser receives the invocation-request. 2700 * 2701 * <BR /><BR /><DIV CLASS=JDHint> 2702 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2703 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2704 * the Browser Function has run to completion. 2705 * </DIV> 2706 */ 2707 public static Script<Void> setVariableValue 2708 (int scopeNumber, String variableName, RunTime.CallArgument newValue, String callFrameId) 2709 { 2710 // Convert all Method Parameters into a JSON Request-Object (as a String) 2711 final String requestJSON = WriteJSON.get( 2712 Debugger$$Commands.setVariableValue$$, "Debugger.setVariableValue", 2713 scopeNumber, variableName, newValue, callFrameId 2714 ); 2715 2716 return Script.NO_RET(Domains.Debugger, "setVariableValue", requestJSON); 2717 } 2718 2719 /** 2720 * Steps into the function call. 2721 * 2722 * @param breakOnAsyncCall 2723 * Debugger will pause on the execution of the first async task which was scheduled 2724 * before next pause. 2725 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 2726 * 2727 * @param skipList The skipList specifies location ranges that should be skipped on step into. 2728 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 2729 * 2730 * @return An instance of <CODE>{@link Script}<Void></CODE> 2731 * 2732 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2733 * browser receives the invocation-request. 2734 * 2735 * <BR /><BR /><DIV CLASS=JDHint> 2736 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2737 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2738 * the Browser Function has run to completion. 2739 * </DIV> 2740 */ 2741 public static Script<Void> stepInto(Boolean breakOnAsyncCall, LocationRange[] skipList) 2742 { 2743 // Convert all Method Parameters into a JSON Request-Object (as a String) 2744 final String requestJSON = WriteJSON.get( 2745 Debugger$$Commands.stepInto$$, "Debugger.stepInto", 2746 breakOnAsyncCall, skipList 2747 ); 2748 2749 return Script.NO_RET(Domains.Debugger, "stepInto", requestJSON); 2750 } 2751 2752 /** 2753 * Steps out of the function call. 2754 * 2755 * @return An instance of <CODE>{@link Script}<Void></CODE> 2756 * 2757 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2758 * browser receives the invocation-request. 2759 * 2760 * <BR /><BR /><DIV CLASS=JDHint> 2761 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2762 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2763 * the Browser Function has run to completion. 2764 * </DIV> 2765 */ 2766 public static Script<Void> stepOut() 2767 { 2768 // Ultra-Simple Request JSON - Because this method has no parameters 2769 final String requestJSON = "{\"method\":\"Debugger.stepOut\"}"; 2770 2771 return Script.NO_RET(Domains.Debugger, "stepOut", requestJSON); 2772 } 2773 2774 /** 2775 * Steps over the statement. 2776 * 2777 * @param skipList The skipList specifies location ranges that should be skipped on step over. 2778 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 2779 * 2780 * @return An instance of <CODE>{@link Script}<Void></CODE> 2781 * 2782 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 2783 * browser receives the invocation-request. 2784 * 2785 * <BR /><BR /><DIV CLASS=JDHint> 2786 * This Browser-Function <I>does not have</I> a return-value. You may choose to 2787 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 2788 * the Browser Function has run to completion. 2789 * </DIV> 2790 */ 2791 public static Script<Void> stepOver(LocationRange[] skipList) 2792 { 2793 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 2794 final String requestJSON = WriteJSON.get( 2795 CDPTypes.CDP_TYPE_ARRAY_1D, "skipList", true, "Debugger.stepOver", (Object) skipList 2796 ); 2797 2798 return Script.NO_RET(Domains.Debugger, "stepOver", requestJSON); 2799 } 2800 2801 2802 // ******************************************************************************************** 2803 // ******************************************************************************************** 2804 // CommandBuilder Getter-Methods 2805 // ******************************************************************************************** 2806 // ******************************************************************************************** 2807 2808 2809 /** 2810 * Creates a buider for conveniently assigning parameters to this method. 2811 * 2812 * <BR /><BR /><DIV CLASS=JDHint> 2813 * Note that the original method expects 9 parameters, and can be cumbersome. 2814 * </DIV> 2815 * 2816 * @return {@link CommandBuilder} instance, for assigning parameter values, one by one. 2817 * @see #evaluateOnCallFrame 2818 */ 2819 public static CommandBuilder<evaluateOnCallFrame$$RET> evaluateOnCallFrame() 2820 { return CommandBuilder.builder(Debugger$$Commands.evaluateOnCallFrame$$); } 2821 2822 /** 2823 * Creates a buider for conveniently assigning parameters to this method. 2824 * 2825 * <BR /><BR /><DIV CLASS=JDHint> 2826 * Note that the original method expects 6 parameters, and can be cumbersome. 2827 * </DIV> 2828 * 2829 * @return {@link CommandBuilder} instance, for assigning parameter values, one by one. 2830 * @see #setBreakpointByUrl 2831 */ 2832 public static CommandBuilder<setBreakpointByUrl$$RET> setBreakpointByUrl() 2833 { return CommandBuilder.builder(Debugger$$Commands.setBreakpointByUrl$$); } 2834 2835 2836}