This repository has been archived by the owner on Oct 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 119
/
crdp.d.ts
10188 lines (6829 loc) · 331 KB
/
crdp.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/***********************************************************
* Auto-generated by protocolToCrdp. Do not edit manually.
***********************************************************/
export namespace Crdp {
export type integer = number
export interface CrdpClient {
Console: ConsoleClient;
Debugger: DebuggerClient;
HeapProfiler: HeapProfilerClient;
Profiler: ProfilerClient;
Runtime: RuntimeClient;
Schema: SchemaClient;
Accessibility: AccessibilityClient;
Animation: AnimationClient;
ApplicationCache: ApplicationCacheClient;
Audits: AuditsClient;
Browser: BrowserClient;
CSS: CSSClient;
CacheStorage: CacheStorageClient;
DOM: DOMClient;
DOMDebugger: DOMDebuggerClient;
DOMSnapshot: DOMSnapshotClient;
DOMStorage: DOMStorageClient;
Database: DatabaseClient;
DeviceOrientation: DeviceOrientationClient;
Emulation: EmulationClient;
HeadlessExperimental: HeadlessExperimentalClient;
IO: IOClient;
IndexedDB: IndexedDBClient;
Input: InputClient;
Inspector: InspectorClient;
LayerTree: LayerTreeClient;
Log: LogClient;
Memory: MemoryClient;
Network: NetworkClient;
Overlay: OverlayClient;
Page: PageClient;
Performance: PerformanceClient;
Security: SecurityClient;
ServiceWorker: ServiceWorkerClient;
Storage: StorageClient;
SystemInfo: SystemInfoClient;
Target: TargetClient;
Tethering: TetheringClient;
Tracing: TracingClient;
}
export interface CrdpServer {
Console: ConsoleServer;
Debugger: DebuggerServer;
HeapProfiler: HeapProfilerServer;
Profiler: ProfilerServer;
Runtime: RuntimeServer;
Schema: SchemaServer;
Accessibility: AccessibilityServer;
Animation: AnimationServer;
ApplicationCache: ApplicationCacheServer;
Audits: AuditsServer;
Browser: BrowserServer;
CSS: CSSServer;
CacheStorage: CacheStorageServer;
DOM: DOMServer;
DOMDebugger: DOMDebuggerServer;
DOMSnapshot: DOMSnapshotServer;
DOMStorage: DOMStorageServer;
Database: DatabaseServer;
DeviceOrientation: DeviceOrientationServer;
Emulation: EmulationServer;
HeadlessExperimental: HeadlessExperimentalServer;
IO: IOServer;
IndexedDB: IndexedDBServer;
Input: InputServer;
Inspector: InspectorServer;
LayerTree: LayerTreeServer;
Log: LogServer;
Memory: MemoryServer;
Network: NetworkServer;
Overlay: OverlayServer;
Page: PageServer;
Performance: PerformanceServer;
Security: SecurityServer;
ServiceWorker: ServiceWorkerServer;
Storage: StorageServer;
SystemInfo: SystemInfoServer;
Target: TargetServer;
Tethering: TetheringServer;
Tracing: TracingServer;
}
/** This domain is deprecated - use Runtime or Log instead. */
export module Console {
/** Console message. */
export interface ConsoleMessage {
/** Message source. */
source: ('xml' | 'javascript' | 'network' | 'console-api' | 'storage' | 'appcache' | 'rendering' | 'security' | 'other' | 'deprecation' | 'worker');
/** Message severity. */
level: ('log' | 'warning' | 'error' | 'debug' | 'info');
/** Message text. */
text: string;
/** URL of the message origin. */
url?: string;
/** Line number in the resource that generated this message (1-based). */
line?: integer;
/** Column number in the resource that generated this message (1-based). */
column?: integer;
}
export interface MessageAddedEvent {
/** Console message that has been added. */
message: ConsoleMessage;
}
}
export interface ConsoleCommands {
/** Does nothing. */
clearMessages?: () => Promise<void>;
/** Disables console domain, prevents further console messages from being reported to the client. */
disable?: () => Promise<void>;
/** Enables console domain, sends the messages collected so far to the client by means of the
`messageAdded` notification. */
enable?: () => Promise<void>;
}
export interface ConsoleClient extends ConsoleCommands {
/** Issued when new console message is added. */
onMessageAdded(handler: (params: Console.MessageAddedEvent) => void): void;
}
export interface ConsoleServer {
/** Issued when new console message is added. */
emitMessageAdded(params: Console.MessageAddedEvent): void;
expose(domain: ConsoleCommands): void;
}
/** Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing
breakpoints, stepping through execution, exploring stack traces, etc. */
export module Debugger {
/** Breakpoint identifier. */
export type BreakpointId = string;
/** Call frame identifier. */
export type CallFrameId = string;
/** Location in the source code. */
export interface Location {
/** Script identifier as reported in the `Debugger.scriptParsed`. */
scriptId: Runtime.ScriptId;
/** Line number in the script (0-based). */
lineNumber: integer;
/** Column number in the script (0-based). */
columnNumber?: integer;
}
/** Location in the source code. */
export interface ScriptPosition {
lineNumber: integer;
columnNumber: integer;
}
/** JavaScript call frame. Array of call frames form the call stack. */
export interface CallFrame {
/** Call frame identifier. This identifier is only valid while the virtual machine is paused. */
callFrameId: CallFrameId;
/** Name of the JavaScript function called on this call frame. */
functionName: string;
/** Location in the source code. */
functionLocation?: Location;
/** Location in the source code. */
location: Location;
/** JavaScript script name or url. */
url: string;
/** Scope chain for this call frame. */
scopeChain: Scope[];
/** `this` object for this call frame. */
this: Runtime.RemoteObject;
/** The value being returned, if the function is at return point. */
returnValue?: Runtime.RemoteObject;
}
/** Scope description. */
export interface Scope {
/** Scope type. */
type: ('global' | 'local' | 'with' | 'closure' | 'catch' | 'block' | 'script' | 'eval' | 'module');
/** Object representing the scope. For `global` and `with` scopes it represents the actual
object; for the rest of the scopes, it is artificial transient object enumerating scope
variables as its properties. */
object: Runtime.RemoteObject;
name?: string;
/** Location in the source code where scope starts */
startLocation?: Location;
/** Location in the source code where scope ends */
endLocation?: Location;
}
/** Search match for resource. */
export interface SearchMatch {
/** Line number in resource content. */
lineNumber: number;
/** Line with match content. */
lineContent: string;
}
export interface BreakLocation {
/** Script identifier as reported in the `Debugger.scriptParsed`. */
scriptId: Runtime.ScriptId;
/** Line number in the script (0-based). */
lineNumber: integer;
/** Column number in the script (0-based). */
columnNumber?: integer;
type?: ('debuggerStatement' | 'call' | 'return');
}
export interface ContinueToLocationRequest {
/** Location to continue to. */
location: Location;
targetCallFrames?: ('any' | 'current');
}
export interface EnableResponse {
/** Unique identifier of the debugger. */
debuggerId: Runtime.UniqueDebuggerId;
}
export interface EvaluateOnCallFrameRequest {
/** Call frame identifier to evaluate on. */
callFrameId: CallFrameId;
/** Expression to evaluate. */
expression: string;
/** String object group name to put result into (allows rapid releasing resulting object handles
using `releaseObjectGroup`). */
objectGroup?: string;
/** Specifies whether command line API should be available to the evaluated expression, defaults
to false. */
includeCommandLineAPI?: boolean;
/** In silent mode exceptions thrown during evaluation are not reported and do not pause
execution. Overrides `setPauseOnException` state. */
silent?: boolean;
/** Whether the result is expected to be a JSON object that should be sent by value. */
returnByValue?: boolean;
/** Whether preview should be generated for the result. */
generatePreview?: boolean;
/** Whether to throw an exception if side effect cannot be ruled out during evaluation. */
throwOnSideEffect?: boolean;
}
export interface EvaluateOnCallFrameResponse {
/** Object wrapper for the evaluation result. */
result: Runtime.RemoteObject;
/** Exception details. */
exceptionDetails?: Runtime.ExceptionDetails;
}
export interface GetPossibleBreakpointsRequest {
/** Start of range to search possible breakpoint locations in. */
start: Location;
/** End of range to search possible breakpoint locations in (excluding). When not specified, end
of scripts is used as end of range. */
end?: Location;
/** Only consider locations which are in the same (non-nested) function as start. */
restrictToFunction?: boolean;
}
export interface GetPossibleBreakpointsResponse {
/** List of the possible breakpoint locations. */
locations: BreakLocation[];
}
export interface GetScriptSourceRequest {
/** Id of the script to get source for. */
scriptId: Runtime.ScriptId;
}
export interface GetScriptSourceResponse {
/** Script source. */
scriptSource: string;
}
export interface GetStackTraceRequest {
stackTraceId: Runtime.StackTraceId;
}
export interface GetStackTraceResponse {
stackTrace: Runtime.StackTrace;
}
export interface PauseOnAsyncCallRequest {
/** Debugger will pause when async call with given stack trace is started. */
parentStackTraceId: Runtime.StackTraceId;
}
export interface RemoveBreakpointRequest {
breakpointId: BreakpointId;
}
export interface RestartFrameRequest {
/** Call frame identifier to evaluate on. */
callFrameId: CallFrameId;
}
export interface RestartFrameResponse {
/** New stack trace. */
callFrames: CallFrame[];
/** Async stack trace, if any. */
asyncStackTrace?: Runtime.StackTrace;
/** Async stack trace, if any. */
asyncStackTraceId?: Runtime.StackTraceId;
}
export interface SearchInContentRequest {
/** Id of the script to search in. */
scriptId: Runtime.ScriptId;
/** String to search for. */
query: string;
/** If true, search is case sensitive. */
caseSensitive?: boolean;
/** If true, treats string parameter as regex. */
isRegex?: boolean;
}
export interface SearchInContentResponse {
/** List of search matches. */
result: SearchMatch[];
}
export interface SetAsyncCallStackDepthRequest {
/** Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
call stacks (default). */
maxDepth: integer;
}
export interface SetBlackboxPatternsRequest {
/** Array of regexps that will be used to check script url for blackbox state. */
patterns: string[];
}
export interface SetBlackboxedRangesRequest {
/** Id of the script. */
scriptId: Runtime.ScriptId;
positions: ScriptPosition[];
}
export interface SetBreakpointRequest {
/** Location to set breakpoint in. */
location: Location;
/** Expression to use as a breakpoint condition. When specified, debugger will only stop on the
breakpoint if this expression evaluates to true. */
condition?: string;
}
export interface SetBreakpointResponse {
/** Id of the created breakpoint for further reference. */
breakpointId: BreakpointId;
/** Location this breakpoint resolved into. */
actualLocation: Location;
}
export interface SetBreakpointByUrlRequest {
/** Line number to set breakpoint at. */
lineNumber: integer;
/** URL of the resources to set breakpoint on. */
url?: string;
/** Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
`urlRegex` must be specified. */
urlRegex?: string;
/** Script hash of the resources to set breakpoint on. */
scriptHash?: string;
/** Offset in the line to set breakpoint at. */
columnNumber?: integer;
/** Expression to use as a breakpoint condition. When specified, debugger will only stop on the
breakpoint if this expression evaluates to true. */
condition?: string;
}
export interface SetBreakpointByUrlResponse {
/** Id of the created breakpoint for further reference. */
breakpointId: BreakpointId;
/** List of the locations this breakpoint resolved into upon addition. */
locations: Location[];
}
export interface SetBreakpointsActiveRequest {
/** New value for breakpoints active state. */
active: boolean;
}
export interface SetPauseOnExceptionsRequest {
/** Pause on exceptions mode. */
state: ('none' | 'uncaught' | 'all');
}
export interface SetReturnValueRequest {
/** New return value. */
newValue: Runtime.CallArgument;
}
export interface SetScriptSourceRequest {
/** Id of the script to edit. */
scriptId: Runtime.ScriptId;
/** New content of the script. */
scriptSource: string;
/** If true the change will not actually be applied. Dry run may be used to get result
description without actually modifying the code. */
dryRun?: boolean;
}
export interface SetScriptSourceResponse {
/** New stack trace in case editing has happened while VM was stopped. */
callFrames?: CallFrame[];
/** Whether current call stack was modified after applying the changes. */
stackChanged?: boolean;
/** Async stack trace, if any. */
asyncStackTrace?: Runtime.StackTrace;
/** Async stack trace, if any. */
asyncStackTraceId?: Runtime.StackTraceId;
/** Exception details if any. */
exceptionDetails?: Runtime.ExceptionDetails;
}
export interface SetSkipAllPausesRequest {
/** New value for skip pauses state. */
skip: boolean;
}
export interface SetVariableValueRequest {
/** 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
scope types are allowed. Other scopes could be manipulated manually. */
scopeNumber: integer;
/** Variable name. */
variableName: string;
/** New variable value. */
newValue: Runtime.CallArgument;
/** Id of callframe that holds variable. */
callFrameId: CallFrameId;
}
export interface StepIntoRequest {
/** Debugger will issue additional Debugger.paused notification if any async task is scheduled
before next pause. */
breakOnAsyncCall?: boolean;
}
export interface BreakpointResolvedEvent {
/** Breakpoint unique identifier. */
breakpointId: BreakpointId;
/** Actual breakpoint location. */
location: Location;
}
export interface PausedEvent {
/** Call stack the virtual machine stopped on. */
callFrames: CallFrame[];
/** Pause reason. */
reason: ('XHR' | 'DOM' | 'EventListener' | 'exception' | 'assert' | 'debugCommand' | 'promiseRejection' | 'OOM' | 'other' | 'ambiguous');
/** Object containing break-specific auxiliary properties. */
data?: any;
/** Hit breakpoints IDs */
hitBreakpoints?: string[];
/** Async stack trace, if any. */
asyncStackTrace?: Runtime.StackTrace;
/** Async stack trace, if any. */
asyncStackTraceId?: Runtime.StackTraceId;
/** Just scheduled async call will have this stack trace as parent stack during async execution.
This field is available only after `Debugger.stepInto` call with `breakOnAsynCall` flag. */
asyncCallStackTraceId?: Runtime.StackTraceId;
}
export interface ScriptFailedToParseEvent {
/** Identifier of the script parsed. */
scriptId: Runtime.ScriptId;
/** URL or name of the script parsed (if any). */
url: string;
/** Line offset of the script within the resource with given URL (for script tags). */
startLine: integer;
/** Column offset of the script within the resource with given URL. */
startColumn: integer;
/** Last line of the script. */
endLine: integer;
/** Length of the last line of the script. */
endColumn: integer;
/** Specifies script creation context. */
executionContextId: Runtime.ExecutionContextId;
/** Content hash of the script. */
hash: string;
/** Embedder-specific auxiliary data. */
executionContextAuxData?: any;
/** URL of source map associated with script (if any). */
sourceMapURL?: string;
/** True, if this script has sourceURL. */
hasSourceURL?: boolean;
/** True, if this script is ES6 module. */
isModule?: boolean;
/** This script length. */
length?: integer;
/** JavaScript top stack frame of where the script parsed event was triggered if available. */
stackTrace?: Runtime.StackTrace;
}
export interface ScriptParsedEvent {
/** Identifier of the script parsed. */
scriptId: Runtime.ScriptId;
/** URL or name of the script parsed (if any). */
url: string;
/** Line offset of the script within the resource with given URL (for script tags). */
startLine: integer;
/** Column offset of the script within the resource with given URL. */
startColumn: integer;
/** Last line of the script. */
endLine: integer;
/** Length of the last line of the script. */
endColumn: integer;
/** Specifies script creation context. */
executionContextId: Runtime.ExecutionContextId;
/** Content hash of the script. */
hash: string;
/** Embedder-specific auxiliary data. */
executionContextAuxData?: any;
/** True, if this script is generated as a result of the live edit operation. */
isLiveEdit?: boolean;
/** URL of source map associated with script (if any). */
sourceMapURL?: string;
/** True, if this script has sourceURL. */
hasSourceURL?: boolean;
/** True, if this script is ES6 module. */
isModule?: boolean;
/** This script length. */
length?: integer;
/** JavaScript top stack frame of where the script parsed event was triggered if available. */
stackTrace?: Runtime.StackTrace;
}
}
export interface DebuggerCommands {
/** Continues execution until specific location is reached. */
continueToLocation?: (params: Debugger.ContinueToLocationRequest) => Promise<void>;
/** Disables debugger for given page. */
disable?: () => Promise<void>;
/** Enables debugger for the given page. Clients should not assume that the debugging has been
enabled until the result for this command is received. */
enable?: () => Promise<Debugger.EnableResponse>;
/** Evaluates expression on a given call frame. */
evaluateOnCallFrame?: (params: Debugger.EvaluateOnCallFrameRequest) => Promise<Debugger.EvaluateOnCallFrameResponse>;
/** Returns possible locations for breakpoint. scriptId in start and end range locations should be
the same. */
getPossibleBreakpoints?: (params: Debugger.GetPossibleBreakpointsRequest) => Promise<Debugger.GetPossibleBreakpointsResponse>;
/** Returns source for the script with given id. */
getScriptSource?: (params: Debugger.GetScriptSourceRequest) => Promise<Debugger.GetScriptSourceResponse>;
/** Returns stack trace with given `stackTraceId`. */
getStackTrace?: (params: Debugger.GetStackTraceRequest) => Promise<Debugger.GetStackTraceResponse>;
/** Stops on the next JavaScript statement. */
pause?: () => Promise<void>;
pauseOnAsyncCall?: (params: Debugger.PauseOnAsyncCallRequest) => Promise<void>;
/** Removes JavaScript breakpoint. */
removeBreakpoint?: (params: Debugger.RemoveBreakpointRequest) => Promise<void>;
/** Restarts particular call frame from the beginning. */
restartFrame?: (params: Debugger.RestartFrameRequest) => Promise<Debugger.RestartFrameResponse>;
/** Resumes JavaScript execution. */
resume?: () => Promise<void>;
/** This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and
Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled
before next pause. Returns success when async task is actually scheduled, returns error if no
task were scheduled or another scheduleStepIntoAsync was called. */
scheduleStepIntoAsync?: () => Promise<void>;
/** Searches for given string in script content. */
searchInContent?: (params: Debugger.SearchInContentRequest) => Promise<Debugger.SearchInContentResponse>;
/** Enables or disables async call stacks tracking. */
setAsyncCallStackDepth?: (params: Debugger.SetAsyncCallStackDepthRequest) => Promise<void>;
/** Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
scripts with url matching one of the patterns. VM will try to leave blackboxed script by
performing 'step in' several times, finally resorting to 'step out' if unsuccessful. */
setBlackboxPatterns?: (params: Debugger.SetBlackboxPatternsRequest) => Promise<void>;
/** Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
Positions array contains positions where blackbox state is changed. First interval isn't
blackboxed. Array should be sorted. */
setBlackboxedRanges?: (params: Debugger.SetBlackboxedRangesRequest) => Promise<void>;
/** Sets JavaScript breakpoint at a given location. */
setBreakpoint?: (params: Debugger.SetBreakpointRequest) => Promise<Debugger.SetBreakpointResponse>;
/** Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
command is issued, all existing parsed scripts will have breakpoints resolved and returned in
`locations` property. Further matching script parsing will result in subsequent
`breakpointResolved` events issued. This logical breakpoint will survive page reloads. */
setBreakpointByUrl?: (params: Debugger.SetBreakpointByUrlRequest) => Promise<Debugger.SetBreakpointByUrlResponse>;
/** Activates / deactivates all breakpoints on the page. */
setBreakpointsActive?: (params: Debugger.SetBreakpointsActiveRequest) => Promise<void>;
/** Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or
no exceptions. Initial pause on exceptions state is `none`. */
setPauseOnExceptions?: (params: Debugger.SetPauseOnExceptionsRequest) => Promise<void>;
/** Changes return value in top frame. Available only at return break position. */
setReturnValue?: (params: Debugger.SetReturnValueRequest) => Promise<void>;
/** Edits JavaScript source live. */
setScriptSource?: (params: Debugger.SetScriptSourceRequest) => Promise<Debugger.SetScriptSourceResponse>;
/** Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). */
setSkipAllPauses?: (params: Debugger.SetSkipAllPausesRequest) => Promise<void>;
/** Changes value of variable in a callframe. Object-based scopes are not supported and must be
mutated manually. */
setVariableValue?: (params: Debugger.SetVariableValueRequest) => Promise<void>;
/** Steps into the function call. */
stepInto?: (params: Debugger.StepIntoRequest) => Promise<void>;
/** Steps out of the function call. */
stepOut?: () => Promise<void>;
/** Steps over the statement. */
stepOver?: () => Promise<void>;
}
export interface DebuggerClient extends DebuggerCommands {
/** Fired when breakpoint is resolved to an actual script and location. */
onBreakpointResolved(handler: (params: Debugger.BreakpointResolvedEvent) => void): void;
/** Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. */
onPaused(handler: (params: Debugger.PausedEvent) => void): void;
/** Fired when the virtual machine resumed execution. */
onResumed(handler: () => void): void;
/** Fired when virtual machine fails to parse the script. */
onScriptFailedToParse(handler: (params: Debugger.ScriptFailedToParseEvent) => void): void;
/** Fired when virtual machine parses script. This event is also fired for all known and uncollected
scripts upon enabling debugger. */
onScriptParsed(handler: (params: Debugger.ScriptParsedEvent) => void): void;
}
export interface DebuggerServer {
/** Fired when breakpoint is resolved to an actual script and location. */
emitBreakpointResolved(params: Debugger.BreakpointResolvedEvent): void;
/** Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. */
emitPaused(params: Debugger.PausedEvent): void;
/** Fired when the virtual machine resumed execution. */
emitResumed(): void;
/** Fired when virtual machine fails to parse the script. */
emitScriptFailedToParse(params: Debugger.ScriptFailedToParseEvent): void;
/** Fired when virtual machine parses script. This event is also fired for all known and uncollected
scripts upon enabling debugger. */
emitScriptParsed(params: Debugger.ScriptParsedEvent): void;
expose(domain: DebuggerCommands): void;
}
export module HeapProfiler {
/** Heap snapshot object id. */
export type HeapSnapshotObjectId = string;
/** Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. */
export interface SamplingHeapProfileNode {
/** Function location. */
callFrame: Runtime.CallFrame;
/** Allocations size in bytes for the node excluding children. */
selfSize: number;
/** Child nodes. */
children: SamplingHeapProfileNode[];
}
/** Profile. */
export interface SamplingHeapProfile {
head: SamplingHeapProfileNode;
}
export interface AddInspectedHeapObjectRequest {
/** Heap snapshot object id to be accessible by means of $x command line API. */
heapObjectId: HeapSnapshotObjectId;
}
export interface GetHeapObjectIdRequest {
/** Identifier of the object to get heap object id for. */
objectId: Runtime.RemoteObjectId;
}
export interface GetHeapObjectIdResponse {
/** Id of the heap snapshot object corresponding to the passed remote object id. */
heapSnapshotObjectId: HeapSnapshotObjectId;
}
export interface GetObjectByHeapObjectIdRequest {
objectId: HeapSnapshotObjectId;
/** Symbolic group name that can be used to release multiple objects. */
objectGroup?: string;
}
export interface GetObjectByHeapObjectIdResponse {
/** Evaluation result. */
result: Runtime.RemoteObject;
}
export interface GetSamplingProfileResponse {
/** Return the sampling profile being collected. */
profile: SamplingHeapProfile;
}
export interface StartSamplingRequest {
/** Average sample interval in bytes. Poisson distribution is used for the intervals. The
default value is 32768 bytes. */
samplingInterval?: number;
}
export interface StartTrackingHeapObjectsRequest {
trackAllocations?: boolean;
}
export interface StopSamplingResponse {
/** Recorded sampling heap profile. */
profile: SamplingHeapProfile;
}
export interface StopTrackingHeapObjectsRequest {
/** If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
when the tracking is stopped. */
reportProgress?: boolean;
}
export interface TakeHeapSnapshotRequest {
/** If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. */
reportProgress?: boolean;
}
export interface AddHeapSnapshotChunkEvent {
chunk: string;
}
export interface HeapStatsUpdateEvent {
/** An array of triplets. Each triplet describes a fragment. The first integer is the fragment
index, the second integer is a total count of objects for the fragment, the third integer is
a total size of the objects for the fragment. */
statsUpdate: integer[];
}