1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | declare module "inspector" {
|
12 | import { EventEmitter } from 'events';
|
13 |
|
14 | interface InspectorNotification<T> {
|
15 | method: string;
|
16 | params: T;
|
17 | }
|
18 |
|
19 | namespace Console {
|
20 | |
21 |
|
22 |
|
23 | interface ConsoleMessage {
|
24 | |
25 |
|
26 |
|
27 | source: string;
|
28 | |
29 |
|
30 |
|
31 | level: string;
|
32 | |
33 |
|
34 |
|
35 | text: string;
|
36 | |
37 |
|
38 |
|
39 | url?: string;
|
40 | |
41 |
|
42 |
|
43 | line?: number;
|
44 | |
45 |
|
46 |
|
47 | column?: number;
|
48 | }
|
49 |
|
50 | interface MessageAddedEventDataType {
|
51 | |
52 |
|
53 |
|
54 | message: ConsoleMessage;
|
55 | }
|
56 | }
|
57 |
|
58 | namespace Debugger {
|
59 | |
60 |
|
61 |
|
62 | type BreakpointId = string;
|
63 |
|
64 | |
65 |
|
66 |
|
67 | type CallFrameId = string;
|
68 |
|
69 | |
70 |
|
71 |
|
72 | interface Location {
|
73 | |
74 |
|
75 |
|
76 | scriptId: Runtime.ScriptId;
|
77 | |
78 |
|
79 |
|
80 | lineNumber: number;
|
81 | |
82 |
|
83 |
|
84 | columnNumber?: number;
|
85 | }
|
86 |
|
87 | |
88 |
|
89 |
|
90 |
|
91 | interface ScriptPosition {
|
92 | lineNumber: number;
|
93 | columnNumber: number;
|
94 | }
|
95 |
|
96 | |
97 |
|
98 |
|
99 | interface CallFrame {
|
100 | |
101 |
|
102 |
|
103 | callFrameId: CallFrameId;
|
104 | |
105 |
|
106 |
|
107 | functionName: string;
|
108 | |
109 |
|
110 |
|
111 | functionLocation?: Location;
|
112 | |
113 |
|
114 |
|
115 | location: Location;
|
116 | |
117 |
|
118 |
|
119 | url: string;
|
120 | |
121 |
|
122 |
|
123 | scopeChain: Scope[];
|
124 | |
125 |
|
126 |
|
127 | this: Runtime.RemoteObject;
|
128 | |
129 |
|
130 |
|
131 | returnValue?: Runtime.RemoteObject;
|
132 | }
|
133 |
|
134 | |
135 |
|
136 |
|
137 | interface Scope {
|
138 | |
139 |
|
140 |
|
141 | type: string;
|
142 | |
143 |
|
144 |
|
145 |
|
146 |
|
147 | object: Runtime.RemoteObject;
|
148 | name?: string;
|
149 | |
150 |
|
151 |
|
152 | startLocation?: Location;
|
153 | |
154 |
|
155 |
|
156 | endLocation?: Location;
|
157 | }
|
158 |
|
159 | |
160 |
|
161 |
|
162 | interface SearchMatch {
|
163 | |
164 |
|
165 |
|
166 | lineNumber: number;
|
167 | |
168 |
|
169 |
|
170 | lineContent: string;
|
171 | }
|
172 |
|
173 | interface BreakLocation {
|
174 | |
175 |
|
176 |
|
177 | scriptId: Runtime.ScriptId;
|
178 | |
179 |
|
180 |
|
181 | lineNumber: number;
|
182 | |
183 |
|
184 |
|
185 | columnNumber?: number;
|
186 | type?: string;
|
187 | }
|
188 |
|
189 | interface ContinueToLocationParameterType {
|
190 | |
191 |
|
192 |
|
193 | location: Location;
|
194 | targetCallFrames?: string;
|
195 | }
|
196 |
|
197 | interface EvaluateOnCallFrameParameterType {
|
198 | |
199 |
|
200 |
|
201 | callFrameId: CallFrameId;
|
202 | |
203 |
|
204 |
|
205 | expression: string;
|
206 | |
207 |
|
208 |
|
209 |
|
210 | objectGroup?: string;
|
211 | |
212 |
|
213 |
|
214 |
|
215 | includeCommandLineAPI?: boolean;
|
216 | |
217 |
|
218 |
|
219 |
|
220 | silent?: boolean;
|
221 | |
222 |
|
223 |
|
224 | returnByValue?: boolean;
|
225 | |
226 |
|
227 |
|
228 |
|
229 | generatePreview?: boolean;
|
230 | |
231 |
|
232 |
|
233 | throwOnSideEffect?: boolean;
|
234 | |
235 |
|
236 |
|
237 |
|
238 | timeout?: Runtime.TimeDelta;
|
239 | }
|
240 |
|
241 | interface GetPossibleBreakpointsParameterType {
|
242 | |
243 |
|
244 |
|
245 | start: Location;
|
246 | |
247 |
|
248 |
|
249 |
|
250 | end?: Location;
|
251 | |
252 |
|
253 |
|
254 | restrictToFunction?: boolean;
|
255 | }
|
256 |
|
257 | interface GetScriptSourceParameterType {
|
258 | |
259 |
|
260 |
|
261 | scriptId: Runtime.ScriptId;
|
262 | }
|
263 |
|
264 | interface GetStackTraceParameterType {
|
265 | stackTraceId: Runtime.StackTraceId;
|
266 | }
|
267 |
|
268 | interface PauseOnAsyncCallParameterType {
|
269 | |
270 |
|
271 |
|
272 | parentStackTraceId: Runtime.StackTraceId;
|
273 | }
|
274 |
|
275 | interface RemoveBreakpointParameterType {
|
276 | breakpointId: BreakpointId;
|
277 | }
|
278 |
|
279 | interface RestartFrameParameterType {
|
280 | |
281 |
|
282 |
|
283 | callFrameId: CallFrameId;
|
284 | }
|
285 |
|
286 | interface SearchInContentParameterType {
|
287 | |
288 |
|
289 |
|
290 | scriptId: Runtime.ScriptId;
|
291 | |
292 |
|
293 |
|
294 | query: string;
|
295 | |
296 |
|
297 |
|
298 | caseSensitive?: boolean;
|
299 | |
300 |
|
301 |
|
302 | isRegex?: boolean;
|
303 | }
|
304 |
|
305 | interface SetAsyncCallStackDepthParameterType {
|
306 | |
307 |
|
308 |
|
309 |
|
310 | maxDepth: number;
|
311 | }
|
312 |
|
313 | interface SetBlackboxPatternsParameterType {
|
314 | |
315 |
|
316 |
|
317 | patterns: string[];
|
318 | }
|
319 |
|
320 | interface SetBlackboxedRangesParameterType {
|
321 | |
322 |
|
323 |
|
324 | scriptId: Runtime.ScriptId;
|
325 | positions: ScriptPosition[];
|
326 | }
|
327 |
|
328 | interface SetBreakpointParameterType {
|
329 | |
330 |
|
331 |
|
332 | location: Location;
|
333 | |
334 |
|
335 |
|
336 |
|
337 | condition?: string;
|
338 | }
|
339 |
|
340 | interface SetBreakpointByUrlParameterType {
|
341 | |
342 |
|
343 |
|
344 | lineNumber: number;
|
345 | |
346 |
|
347 |
|
348 | url?: string;
|
349 | |
350 |
|
351 |
|
352 |
|
353 | urlRegex?: string;
|
354 | |
355 |
|
356 |
|
357 | scriptHash?: string;
|
358 | |
359 |
|
360 |
|
361 | columnNumber?: number;
|
362 | |
363 |
|
364 |
|
365 |
|
366 | condition?: string;
|
367 | }
|
368 |
|
369 | interface SetBreakpointOnFunctionCallParameterType {
|
370 | |
371 |
|
372 |
|
373 | objectId: Runtime.RemoteObjectId;
|
374 | |
375 |
|
376 |
|
377 |
|
378 | condition?: string;
|
379 | }
|
380 |
|
381 | interface SetBreakpointsActiveParameterType {
|
382 | |
383 |
|
384 |
|
385 | active: boolean;
|
386 | }
|
387 |
|
388 | interface SetPauseOnExceptionsParameterType {
|
389 | |
390 |
|
391 |
|
392 | state: string;
|
393 | }
|
394 |
|
395 | interface SetReturnValueParameterType {
|
396 | |
397 |
|
398 |
|
399 | newValue: Runtime.CallArgument;
|
400 | }
|
401 |
|
402 | interface SetScriptSourceParameterType {
|
403 | |
404 |
|
405 |
|
406 | scriptId: Runtime.ScriptId;
|
407 | |
408 |
|
409 |
|
410 | scriptSource: string;
|
411 | |
412 |
|
413 |
|
414 |
|
415 | dryRun?: boolean;
|
416 | }
|
417 |
|
418 | interface SetSkipAllPausesParameterType {
|
419 | |
420 |
|
421 |
|
422 | skip: boolean;
|
423 | }
|
424 |
|
425 | interface SetVariableValueParameterType {
|
426 | |
427 |
|
428 |
|
429 |
|
430 | scopeNumber: number;
|
431 | |
432 |
|
433 |
|
434 | variableName: string;
|
435 | |
436 |
|
437 |
|
438 | newValue: Runtime.CallArgument;
|
439 | |
440 |
|
441 |
|
442 | callFrameId: CallFrameId;
|
443 | }
|
444 |
|
445 | interface StepIntoParameterType {
|
446 | |
447 |
|
448 |
|
449 |
|
450 |
|
451 | breakOnAsyncCall?: boolean;
|
452 | }
|
453 |
|
454 | interface EnableReturnType {
|
455 | |
456 |
|
457 |
|
458 |
|
459 | debuggerId: Runtime.UniqueDebuggerId;
|
460 | }
|
461 |
|
462 | interface EvaluateOnCallFrameReturnType {
|
463 | |
464 |
|
465 |
|
466 | result: Runtime.RemoteObject;
|
467 | |
468 |
|
469 |
|
470 | exceptionDetails?: Runtime.ExceptionDetails;
|
471 | }
|
472 |
|
473 | interface GetPossibleBreakpointsReturnType {
|
474 | |
475 |
|
476 |
|
477 | locations: BreakLocation[];
|
478 | }
|
479 |
|
480 | interface GetScriptSourceReturnType {
|
481 | |
482 |
|
483 |
|
484 | scriptSource: string;
|
485 | }
|
486 |
|
487 | interface GetStackTraceReturnType {
|
488 | stackTrace: Runtime.StackTrace;
|
489 | }
|
490 |
|
491 | interface RestartFrameReturnType {
|
492 | |
493 |
|
494 |
|
495 | callFrames: CallFrame[];
|
496 | |
497 |
|
498 |
|
499 | asyncStackTrace?: Runtime.StackTrace;
|
500 | |
501 |
|
502 |
|
503 |
|
504 | asyncStackTraceId?: Runtime.StackTraceId;
|
505 | }
|
506 |
|
507 | interface SearchInContentReturnType {
|
508 | |
509 |
|
510 |
|
511 | result: SearchMatch[];
|
512 | }
|
513 |
|
514 | interface SetBreakpointReturnType {
|
515 | |
516 |
|
517 |
|
518 | breakpointId: BreakpointId;
|
519 | |
520 |
|
521 |
|
522 | actualLocation: Location;
|
523 | }
|
524 |
|
525 | interface SetBreakpointByUrlReturnType {
|
526 | |
527 |
|
528 |
|
529 | breakpointId: BreakpointId;
|
530 | |
531 |
|
532 |
|
533 | locations: Location[];
|
534 | }
|
535 |
|
536 | interface SetBreakpointOnFunctionCallReturnType {
|
537 | |
538 |
|
539 |
|
540 | breakpointId: BreakpointId;
|
541 | }
|
542 |
|
543 | interface SetScriptSourceReturnType {
|
544 | |
545 |
|
546 |
|
547 | callFrames?: CallFrame[];
|
548 | |
549 |
|
550 |
|
551 | stackChanged?: boolean;
|
552 | |
553 |
|
554 |
|
555 | asyncStackTrace?: Runtime.StackTrace;
|
556 | |
557 |
|
558 |
|
559 |
|
560 | asyncStackTraceId?: Runtime.StackTraceId;
|
561 | |
562 |
|
563 |
|
564 | exceptionDetails?: Runtime.ExceptionDetails;
|
565 | }
|
566 |
|
567 | interface BreakpointResolvedEventDataType {
|
568 | |
569 |
|
570 |
|
571 | breakpointId: BreakpointId;
|
572 | |
573 |
|
574 |
|
575 | location: Location;
|
576 | }
|
577 |
|
578 | interface PausedEventDataType {
|
579 | |
580 |
|
581 |
|
582 | callFrames: CallFrame[];
|
583 | |
584 |
|
585 |
|
586 | reason: string;
|
587 | |
588 |
|
589 |
|
590 | data?: {};
|
591 | |
592 |
|
593 |
|
594 | hitBreakpoints?: string[];
|
595 | |
596 |
|
597 |
|
598 | asyncStackTrace?: Runtime.StackTrace;
|
599 | |
600 |
|
601 |
|
602 |
|
603 | asyncStackTraceId?: Runtime.StackTraceId;
|
604 | |
605 |
|
606 |
|
607 |
|
608 |
|
609 | asyncCallStackTraceId?: Runtime.StackTraceId;
|
610 | }
|
611 |
|
612 | interface ScriptFailedToParseEventDataType {
|
613 | |
614 |
|
615 |
|
616 | scriptId: Runtime.ScriptId;
|
617 | |
618 |
|
619 |
|
620 | url: string;
|
621 | |
622 |
|
623 |
|
624 | startLine: number;
|
625 | |
626 |
|
627 |
|
628 | startColumn: number;
|
629 | |
630 |
|
631 |
|
632 | endLine: number;
|
633 | |
634 |
|
635 |
|
636 | endColumn: number;
|
637 | |
638 |
|
639 |
|
640 | executionContextId: Runtime.ExecutionContextId;
|
641 | |
642 |
|
643 |
|
644 | hash: string;
|
645 | |
646 |
|
647 |
|
648 | executionContextAuxData?: {};
|
649 | |
650 |
|
651 |
|
652 | sourceMapURL?: string;
|
653 | |
654 |
|
655 |
|
656 | hasSourceURL?: boolean;
|
657 | |
658 |
|
659 |
|
660 | isModule?: boolean;
|
661 | |
662 |
|
663 |
|
664 | length?: number;
|
665 | |
666 |
|
667 |
|
668 |
|
669 | stackTrace?: Runtime.StackTrace;
|
670 | }
|
671 |
|
672 | interface ScriptParsedEventDataType {
|
673 | |
674 |
|
675 |
|
676 | scriptId: Runtime.ScriptId;
|
677 | |
678 |
|
679 |
|
680 | url: string;
|
681 | |
682 |
|
683 |
|
684 | startLine: number;
|
685 | |
686 |
|
687 |
|
688 | startColumn: number;
|
689 | |
690 |
|
691 |
|
692 | endLine: number;
|
693 | |
694 |
|
695 |
|
696 | endColumn: number;
|
697 | |
698 |
|
699 |
|
700 | executionContextId: Runtime.ExecutionContextId;
|
701 | |
702 |
|
703 |
|
704 | hash: string;
|
705 | |
706 |
|
707 |
|
708 | executionContextAuxData?: {};
|
709 | |
710 |
|
711 |
|
712 |
|
713 | isLiveEdit?: boolean;
|
714 | |
715 |
|
716 |
|
717 | sourceMapURL?: string;
|
718 | |
719 |
|
720 |
|
721 | hasSourceURL?: boolean;
|
722 | |
723 |
|
724 |
|
725 | isModule?: boolean;
|
726 | |
727 |
|
728 |
|
729 | length?: number;
|
730 | |
731 |
|
732 |
|
733 |
|
734 | stackTrace?: Runtime.StackTrace;
|
735 | }
|
736 | }
|
737 |
|
738 | namespace HeapProfiler {
|
739 | |
740 |
|
741 |
|
742 | type HeapSnapshotObjectId = string;
|
743 |
|
744 | |
745 |
|
746 |
|
747 | interface SamplingHeapProfileNode {
|
748 | |
749 |
|
750 |
|
751 | callFrame: Runtime.CallFrame;
|
752 | |
753 |
|
754 |
|
755 | selfSize: number;
|
756 | |
757 |
|
758 |
|
759 | children: SamplingHeapProfileNode[];
|
760 | }
|
761 |
|
762 | |
763 |
|
764 |
|
765 | interface SamplingHeapProfile {
|
766 | head: SamplingHeapProfileNode;
|
767 | }
|
768 |
|
769 | interface AddInspectedHeapObjectParameterType {
|
770 | |
771 |
|
772 |
|
773 | heapObjectId: HeapSnapshotObjectId;
|
774 | }
|
775 |
|
776 | interface GetHeapObjectIdParameterType {
|
777 | |
778 |
|
779 |
|
780 | objectId: Runtime.RemoteObjectId;
|
781 | }
|
782 |
|
783 | interface GetObjectByHeapObjectIdParameterType {
|
784 | objectId: HeapSnapshotObjectId;
|
785 | |
786 |
|
787 |
|
788 | objectGroup?: string;
|
789 | }
|
790 |
|
791 | interface StartSamplingParameterType {
|
792 | |
793 |
|
794 |
|
795 |
|
796 | samplingInterval?: number;
|
797 | }
|
798 |
|
799 | interface StartTrackingHeapObjectsParameterType {
|
800 | trackAllocations?: boolean;
|
801 | }
|
802 |
|
803 | interface StopTrackingHeapObjectsParameterType {
|
804 | |
805 |
|
806 |
|
807 |
|
808 | reportProgress?: boolean;
|
809 | }
|
810 |
|
811 | interface TakeHeapSnapshotParameterType {
|
812 | |
813 |
|
814 |
|
815 | reportProgress?: boolean;
|
816 | }
|
817 |
|
818 | interface GetHeapObjectIdReturnType {
|
819 | |
820 |
|
821 |
|
822 | heapSnapshotObjectId: HeapSnapshotObjectId;
|
823 | }
|
824 |
|
825 | interface GetObjectByHeapObjectIdReturnType {
|
826 | |
827 |
|
828 |
|
829 | result: Runtime.RemoteObject;
|
830 | }
|
831 |
|
832 | interface GetSamplingProfileReturnType {
|
833 | |
834 |
|
835 |
|
836 | profile: SamplingHeapProfile;
|
837 | }
|
838 |
|
839 | interface StopSamplingReturnType {
|
840 | |
841 |
|
842 |
|
843 | profile: SamplingHeapProfile;
|
844 | }
|
845 |
|
846 | interface AddHeapSnapshotChunkEventDataType {
|
847 | chunk: string;
|
848 | }
|
849 |
|
850 | interface HeapStatsUpdateEventDataType {
|
851 | |
852 |
|
853 |
|
854 |
|
855 |
|
856 | statsUpdate: number[];
|
857 | }
|
858 |
|
859 | interface LastSeenObjectIdEventDataType {
|
860 | lastSeenObjectId: number;
|
861 | timestamp: number;
|
862 | }
|
863 |
|
864 | interface ReportHeapSnapshotProgressEventDataType {
|
865 | done: number;
|
866 | total: number;
|
867 | finished?: boolean;
|
868 | }
|
869 | }
|
870 |
|
871 | namespace Profiler {
|
872 | |
873 |
|
874 |
|
875 | interface ProfileNode {
|
876 | |
877 |
|
878 |
|
879 | id: number;
|
880 | |
881 |
|
882 |
|
883 | callFrame: Runtime.CallFrame;
|
884 | |
885 |
|
886 |
|
887 | hitCount?: number;
|
888 | |
889 |
|
890 |
|
891 | children?: number[];
|
892 | |
893 |
|
894 |
|
895 |
|
896 | deoptReason?: string;
|
897 | |
898 |
|
899 |
|
900 | positionTicks?: PositionTickInfo[];
|
901 | }
|
902 |
|
903 | |
904 |
|
905 |
|
906 | interface Profile {
|
907 | |
908 |
|
909 |
|
910 | nodes: ProfileNode[];
|
911 | |
912 |
|
913 |
|
914 | startTime: number;
|
915 | |
916 |
|
917 |
|
918 | endTime: number;
|
919 | |
920 |
|
921 |
|
922 | samples?: number[];
|
923 | |
924 |
|
925 |
|
926 |
|
927 | timeDeltas?: number[];
|
928 | }
|
929 |
|
930 | |
931 |
|
932 |
|
933 | interface PositionTickInfo {
|
934 | |
935 |
|
936 |
|
937 | line: number;
|
938 | |
939 |
|
940 |
|
941 | ticks: number;
|
942 | }
|
943 |
|
944 | |
945 |
|
946 |
|
947 | interface CoverageRange {
|
948 | |
949 |
|
950 |
|
951 | startOffset: number;
|
952 | |
953 |
|
954 |
|
955 | endOffset: number;
|
956 | |
957 |
|
958 |
|
959 | count: number;
|
960 | }
|
961 |
|
962 | |
963 |
|
964 |
|
965 | interface FunctionCoverage {
|
966 | |
967 |
|
968 |
|
969 | functionName: string;
|
970 | |
971 |
|
972 |
|
973 | ranges: CoverageRange[];
|
974 | |
975 |
|
976 |
|
977 | isBlockCoverage: boolean;
|
978 | }
|
979 |
|
980 | |
981 |
|
982 |
|
983 | interface ScriptCoverage {
|
984 | |
985 |
|
986 |
|
987 | scriptId: Runtime.ScriptId;
|
988 | |
989 |
|
990 |
|
991 | url: string;
|
992 | |
993 |
|
994 |
|
995 | functions: FunctionCoverage[];
|
996 | }
|
997 |
|
998 | |
999 |
|
1000 |
|
1001 |
|
1002 | interface TypeObject {
|
1003 | |
1004 |
|
1005 |
|
1006 | name: string;
|
1007 | }
|
1008 |
|
1009 | |
1010 |
|
1011 |
|
1012 |
|
1013 | interface TypeProfileEntry {
|
1014 | |
1015 |
|
1016 |
|
1017 | offset: number;
|
1018 | |
1019 |
|
1020 |
|
1021 | types: TypeObject[];
|
1022 | }
|
1023 |
|
1024 | |
1025 |
|
1026 |
|
1027 |
|
1028 | interface ScriptTypeProfile {
|
1029 | |
1030 |
|
1031 |
|
1032 | scriptId: Runtime.ScriptId;
|
1033 | |
1034 |
|
1035 |
|
1036 | url: string;
|
1037 | |
1038 |
|
1039 |
|
1040 | entries: TypeProfileEntry[];
|
1041 | }
|
1042 |
|
1043 | interface SetSamplingIntervalParameterType {
|
1044 | |
1045 |
|
1046 |
|
1047 | interval: number;
|
1048 | }
|
1049 |
|
1050 | interface StartPreciseCoverageParameterType {
|
1051 | |
1052 |
|
1053 |
|
1054 | callCount?: boolean;
|
1055 | |
1056 |
|
1057 |
|
1058 | detailed?: boolean;
|
1059 | }
|
1060 |
|
1061 | interface GetBestEffortCoverageReturnType {
|
1062 | |
1063 |
|
1064 |
|
1065 | result: ScriptCoverage[];
|
1066 | }
|
1067 |
|
1068 | interface StopReturnType {
|
1069 | |
1070 |
|
1071 |
|
1072 | profile: Profile;
|
1073 | }
|
1074 |
|
1075 | interface TakePreciseCoverageReturnType {
|
1076 | |
1077 |
|
1078 |
|
1079 | result: ScriptCoverage[];
|
1080 | }
|
1081 |
|
1082 | interface TakeTypeProfileReturnType {
|
1083 | |
1084 |
|
1085 |
|
1086 | result: ScriptTypeProfile[];
|
1087 | }
|
1088 |
|
1089 | interface ConsoleProfileFinishedEventDataType {
|
1090 | id: string;
|
1091 | |
1092 |
|
1093 |
|
1094 | location: Debugger.Location;
|
1095 | profile: Profile;
|
1096 | |
1097 |
|
1098 |
|
1099 | title?: string;
|
1100 | }
|
1101 |
|
1102 | interface ConsoleProfileStartedEventDataType {
|
1103 | id: string;
|
1104 | |
1105 |
|
1106 |
|
1107 | location: Debugger.Location;
|
1108 | |
1109 |
|
1110 |
|
1111 | title?: string;
|
1112 | }
|
1113 | }
|
1114 |
|
1115 | namespace Runtime {
|
1116 | |
1117 |
|
1118 |
|
1119 | type ScriptId = string;
|
1120 |
|
1121 | |
1122 |
|
1123 |
|
1124 | type RemoteObjectId = string;
|
1125 |
|
1126 | |
1127 |
|
1128 |
|
1129 |
|
1130 | type UnserializableValue = string;
|
1131 |
|
1132 | |
1133 |
|
1134 |
|
1135 | interface RemoteObject {
|
1136 | |
1137 |
|
1138 |
|
1139 | type: string;
|
1140 | |
1141 |
|
1142 |
|
1143 | subtype?: string;
|
1144 | |
1145 |
|
1146 |
|
1147 | className?: string;
|
1148 | |
1149 |
|
1150 |
|
1151 | value?: any;
|
1152 | |
1153 |
|
1154 |
|
1155 |
|
1156 | unserializableValue?: UnserializableValue;
|
1157 | |
1158 |
|
1159 |
|
1160 | description?: string;
|
1161 | |
1162 |
|
1163 |
|
1164 | objectId?: RemoteObjectId;
|
1165 | |
1166 |
|
1167 |
|
1168 |
|
1169 | preview?: ObjectPreview;
|
1170 | |
1171 |
|
1172 |
|
1173 | customPreview?: CustomPreview;
|
1174 | }
|
1175 |
|
1176 | |
1177 |
|
1178 |
|
1179 | interface CustomPreview {
|
1180 | header: string;
|
1181 | hasBody: boolean;
|
1182 | formatterObjectId: RemoteObjectId;
|
1183 | bindRemoteObjectFunctionId: RemoteObjectId;
|
1184 | configObjectId?: RemoteObjectId;
|
1185 | }
|
1186 |
|
1187 | |
1188 |
|
1189 |
|
1190 |
|
1191 | interface ObjectPreview {
|
1192 | |
1193 |
|
1194 |
|
1195 | type: string;
|
1196 | |
1197 |
|
1198 |
|
1199 | subtype?: string;
|
1200 | |
1201 |
|
1202 |
|
1203 | description?: string;
|
1204 | |
1205 |
|
1206 |
|
1207 | overflow: boolean;
|
1208 | |
1209 |
|
1210 |
|
1211 | properties: PropertyPreview[];
|
1212 | |
1213 |
|
1214 |
|
1215 | entries?: EntryPreview[];
|
1216 | }
|
1217 |
|
1218 | |
1219 |
|
1220 |
|
1221 | interface PropertyPreview {
|
1222 | |
1223 |
|
1224 |
|
1225 | name: string;
|
1226 | |
1227 |
|
1228 |
|
1229 | type: string;
|
1230 | |
1231 |
|
1232 |
|
1233 | value?: string;
|
1234 | |
1235 |
|
1236 |
|
1237 | valuePreview?: ObjectPreview;
|
1238 | |
1239 |
|
1240 |
|
1241 | subtype?: string;
|
1242 | }
|
1243 |
|
1244 | |
1245 |
|
1246 |
|
1247 | interface EntryPreview {
|
1248 | |
1249 |
|
1250 |
|
1251 | key?: ObjectPreview;
|
1252 | |
1253 |
|
1254 |
|
1255 | value: ObjectPreview;
|
1256 | }
|
1257 |
|
1258 | |
1259 |
|
1260 |
|
1261 | interface PropertyDescriptor {
|
1262 | |
1263 |
|
1264 |
|
1265 | name: string;
|
1266 | |
1267 |
|
1268 |
|
1269 | value?: RemoteObject;
|
1270 | |
1271 |
|
1272 |
|
1273 | writable?: boolean;
|
1274 | |
1275 |
|
1276 |
|
1277 |
|
1278 | get?: RemoteObject;
|
1279 | |
1280 |
|
1281 |
|
1282 |
|
1283 | set?: RemoteObject;
|
1284 | |
1285 |
|
1286 |
|
1287 |
|
1288 | configurable: boolean;
|
1289 | |
1290 |
|
1291 |
|
1292 |
|
1293 | enumerable: boolean;
|
1294 | |
1295 |
|
1296 |
|
1297 | wasThrown?: boolean;
|
1298 | |
1299 |
|
1300 |
|
1301 | isOwn?: boolean;
|
1302 | |
1303 |
|
1304 |
|
1305 | symbol?: RemoteObject;
|
1306 | }
|
1307 |
|
1308 | |
1309 |
|
1310 |
|
1311 | interface InternalPropertyDescriptor {
|
1312 | |
1313 |
|
1314 |
|
1315 | name: string;
|
1316 | |
1317 |
|
1318 |
|
1319 | value?: RemoteObject;
|
1320 | }
|
1321 |
|
1322 | |
1323 |
|
1324 |
|
1325 |
|
1326 | interface CallArgument {
|
1327 | |
1328 |
|
1329 |
|
1330 | value?: any;
|
1331 | |
1332 |
|
1333 |
|
1334 | unserializableValue?: UnserializableValue;
|
1335 | |
1336 |
|
1337 |
|
1338 | objectId?: RemoteObjectId;
|
1339 | }
|
1340 |
|
1341 | |
1342 |
|
1343 |
|
1344 | type ExecutionContextId = number;
|
1345 |
|
1346 | |
1347 |
|
1348 |
|
1349 | interface ExecutionContextDescription {
|
1350 | |
1351 |
|
1352 |
|
1353 |
|
1354 | id: ExecutionContextId;
|
1355 | |
1356 |
|
1357 |
|
1358 | origin: string;
|
1359 | |
1360 |
|
1361 |
|
1362 | name: string;
|
1363 | |
1364 |
|
1365 |
|
1366 | auxData?: {};
|
1367 | }
|
1368 |
|
1369 | |
1370 |
|
1371 |
|
1372 |
|
1373 | interface ExceptionDetails {
|
1374 | |
1375 |
|
1376 |
|
1377 | exceptionId: number;
|
1378 | |
1379 |
|
1380 |
|
1381 | text: string;
|
1382 | |
1383 |
|
1384 |
|
1385 | lineNumber: number;
|
1386 | |
1387 |
|
1388 |
|
1389 | columnNumber: number;
|
1390 | |
1391 |
|
1392 |
|
1393 | scriptId?: ScriptId;
|
1394 | |
1395 |
|
1396 |
|
1397 | url?: string;
|
1398 | |
1399 |
|
1400 |
|
1401 | stackTrace?: StackTrace;
|
1402 | |
1403 |
|
1404 |
|
1405 | exception?: RemoteObject;
|
1406 | |
1407 |
|
1408 |
|
1409 | executionContextId?: ExecutionContextId;
|
1410 | }
|
1411 |
|
1412 | |
1413 |
|
1414 |
|
1415 | type Timestamp = number;
|
1416 |
|
1417 | |
1418 |
|
1419 |
|
1420 | type TimeDelta = number;
|
1421 |
|
1422 | |
1423 |
|
1424 |
|
1425 | interface CallFrame {
|
1426 | |
1427 |
|
1428 |
|
1429 | functionName: string;
|
1430 | |
1431 |
|
1432 |
|
1433 | scriptId: ScriptId;
|
1434 | |
1435 |
|
1436 |
|
1437 | url: string;
|
1438 | |
1439 |
|
1440 |
|
1441 | lineNumber: number;
|
1442 | |
1443 |
|
1444 |
|
1445 | columnNumber: number;
|
1446 | }
|
1447 |
|
1448 | |
1449 |
|
1450 |
|
1451 | interface StackTrace {
|
1452 | |
1453 |
|
1454 |
|
1455 |
|
1456 | description?: string;
|
1457 | |
1458 |
|
1459 |
|
1460 | callFrames: CallFrame[];
|
1461 | |
1462 |
|
1463 |
|
1464 | parent?: StackTrace;
|
1465 | |
1466 |
|
1467 |
|
1468 |
|
1469 | parentId?: StackTraceId;
|
1470 | }
|
1471 |
|
1472 | |
1473 |
|
1474 |
|
1475 |
|
1476 | type UniqueDebuggerId = string;
|
1477 |
|
1478 | |
1479 |
|
1480 |
|
1481 |
|
1482 |
|
1483 | interface StackTraceId {
|
1484 | id: string;
|
1485 | debuggerId?: UniqueDebuggerId;
|
1486 | }
|
1487 |
|
1488 | interface AwaitPromiseParameterType {
|
1489 | |
1490 |
|
1491 |
|
1492 | promiseObjectId: RemoteObjectId;
|
1493 | |
1494 |
|
1495 |
|
1496 | returnByValue?: boolean;
|
1497 | |
1498 |
|
1499 |
|
1500 | generatePreview?: boolean;
|
1501 | }
|
1502 |
|
1503 | interface CallFunctionOnParameterType {
|
1504 | |
1505 |
|
1506 |
|
1507 | functionDeclaration: string;
|
1508 | |
1509 |
|
1510 |
|
1511 |
|
1512 | objectId?: RemoteObjectId;
|
1513 | |
1514 |
|
1515 |
|
1516 |
|
1517 | arguments?: CallArgument[];
|
1518 | |
1519 |
|
1520 |
|
1521 |
|
1522 | silent?: boolean;
|
1523 | |
1524 |
|
1525 |
|
1526 | returnByValue?: boolean;
|
1527 | |
1528 |
|
1529 |
|
1530 |
|
1531 | generatePreview?: boolean;
|
1532 | |
1533 |
|
1534 |
|
1535 | userGesture?: boolean;
|
1536 | |
1537 |
|
1538 |
|
1539 |
|
1540 | awaitPromise?: boolean;
|
1541 | |
1542 |
|
1543 |
|
1544 |
|
1545 | executionContextId?: ExecutionContextId;
|
1546 | |
1547 |
|
1548 |
|
1549 |
|
1550 | objectGroup?: string;
|
1551 | }
|
1552 |
|
1553 | interface CompileScriptParameterType {
|
1554 | |
1555 |
|
1556 |
|
1557 | expression: string;
|
1558 | |
1559 |
|
1560 |
|
1561 | sourceURL: string;
|
1562 | |
1563 |
|
1564 |
|
1565 | persistScript: boolean;
|
1566 | |
1567 |
|
1568 |
|
1569 |
|
1570 | executionContextId?: ExecutionContextId;
|
1571 | }
|
1572 |
|
1573 | interface EvaluateParameterType {
|
1574 | |
1575 |
|
1576 |
|
1577 | expression: string;
|
1578 | |
1579 |
|
1580 |
|
1581 | objectGroup?: string;
|
1582 | |
1583 |
|
1584 |
|
1585 | includeCommandLineAPI?: boolean;
|
1586 | |
1587 |
|
1588 |
|
1589 |
|
1590 | silent?: boolean;
|
1591 | |
1592 |
|
1593 |
|
1594 |
|
1595 | contextId?: ExecutionContextId;
|
1596 | |
1597 |
|
1598 |
|
1599 | returnByValue?: boolean;
|
1600 | |
1601 |
|
1602 |
|
1603 |
|
1604 | generatePreview?: boolean;
|
1605 | |
1606 |
|
1607 |
|
1608 | userGesture?: boolean;
|
1609 | |
1610 |
|
1611 |
|
1612 |
|
1613 | awaitPromise?: boolean;
|
1614 | |
1615 |
|
1616 |
|
1617 |
|
1618 | throwOnSideEffect?: boolean;
|
1619 | |
1620 |
|
1621 |
|
1622 |
|
1623 | timeout?: TimeDelta;
|
1624 | }
|
1625 |
|
1626 | interface GetPropertiesParameterType {
|
1627 | |
1628 |
|
1629 |
|
1630 | objectId: RemoteObjectId;
|
1631 | |
1632 |
|
1633 |
|
1634 |
|
1635 | ownProperties?: boolean;
|
1636 | |
1637 |
|
1638 |
|
1639 |
|
1640 |
|
1641 | accessorPropertiesOnly?: boolean;
|
1642 | |
1643 |
|
1644 |
|
1645 |
|
1646 | generatePreview?: boolean;
|
1647 | }
|
1648 |
|
1649 | interface GlobalLexicalScopeNamesParameterType {
|
1650 | |
1651 |
|
1652 |
|
1653 | executionContextId?: ExecutionContextId;
|
1654 | }
|
1655 |
|
1656 | interface QueryObjectsParameterType {
|
1657 | |
1658 |
|
1659 |
|
1660 | prototypeObjectId: RemoteObjectId;
|
1661 | |
1662 |
|
1663 |
|
1664 | objectGroup?: string;
|
1665 | }
|
1666 |
|
1667 | interface ReleaseObjectParameterType {
|
1668 | |
1669 |
|
1670 |
|
1671 | objectId: RemoteObjectId;
|
1672 | }
|
1673 |
|
1674 | interface ReleaseObjectGroupParameterType {
|
1675 | |
1676 |
|
1677 |
|
1678 | objectGroup: string;
|
1679 | }
|
1680 |
|
1681 | interface RunScriptParameterType {
|
1682 | |
1683 |
|
1684 |
|
1685 | scriptId: ScriptId;
|
1686 | |
1687 |
|
1688 |
|
1689 |
|
1690 | executionContextId?: ExecutionContextId;
|
1691 | |
1692 |
|
1693 |
|
1694 | objectGroup?: string;
|
1695 | |
1696 |
|
1697 |
|
1698 |
|
1699 | silent?: boolean;
|
1700 | |
1701 |
|
1702 |
|
1703 | includeCommandLineAPI?: boolean;
|
1704 | |
1705 |
|
1706 |
|
1707 | returnByValue?: boolean;
|
1708 | |
1709 |
|
1710 |
|
1711 | generatePreview?: boolean;
|
1712 | |
1713 |
|
1714 |
|
1715 |
|
1716 | awaitPromise?: boolean;
|
1717 | }
|
1718 |
|
1719 | interface SetAsyncCallStackDepthParameterType {
|
1720 | |
1721 |
|
1722 |
|
1723 |
|
1724 | maxDepth: number;
|
1725 | }
|
1726 |
|
1727 | interface SetCustomObjectFormatterEnabledParameterType {
|
1728 | enabled: boolean;
|
1729 | }
|
1730 |
|
1731 | interface SetMaxCallStackSizeToCaptureParameterType {
|
1732 | size: number;
|
1733 | }
|
1734 |
|
1735 | interface AddBindingParameterType {
|
1736 | name: string;
|
1737 | executionContextId?: ExecutionContextId;
|
1738 | }
|
1739 |
|
1740 | interface RemoveBindingParameterType {
|
1741 | name: string;
|
1742 | }
|
1743 |
|
1744 | interface AwaitPromiseReturnType {
|
1745 | |
1746 |
|
1747 |
|
1748 | result: RemoteObject;
|
1749 | |
1750 |
|
1751 |
|
1752 | exceptionDetails?: ExceptionDetails;
|
1753 | }
|
1754 |
|
1755 | interface CallFunctionOnReturnType {
|
1756 | |
1757 |
|
1758 |
|
1759 | result: RemoteObject;
|
1760 | |
1761 |
|
1762 |
|
1763 | exceptionDetails?: ExceptionDetails;
|
1764 | }
|
1765 |
|
1766 | interface CompileScriptReturnType {
|
1767 | |
1768 |
|
1769 |
|
1770 | scriptId?: ScriptId;
|
1771 | |
1772 |
|
1773 |
|
1774 | exceptionDetails?: ExceptionDetails;
|
1775 | }
|
1776 |
|
1777 | interface EvaluateReturnType {
|
1778 | |
1779 |
|
1780 |
|
1781 | result: RemoteObject;
|
1782 | |
1783 |
|
1784 |
|
1785 | exceptionDetails?: ExceptionDetails;
|
1786 | }
|
1787 |
|
1788 | interface GetIsolateIdReturnType {
|
1789 | |
1790 |
|
1791 |
|
1792 | id: string;
|
1793 | }
|
1794 |
|
1795 | interface GetHeapUsageReturnType {
|
1796 | |
1797 |
|
1798 |
|
1799 | usedSize: number;
|
1800 | |
1801 |
|
1802 |
|
1803 | totalSize: number;
|
1804 | }
|
1805 |
|
1806 | interface GetPropertiesReturnType {
|
1807 | |
1808 |
|
1809 |
|
1810 | result: PropertyDescriptor[];
|
1811 | |
1812 |
|
1813 |
|
1814 | internalProperties?: InternalPropertyDescriptor[];
|
1815 | |
1816 |
|
1817 |
|
1818 | exceptionDetails?: ExceptionDetails;
|
1819 | }
|
1820 |
|
1821 | interface GlobalLexicalScopeNamesReturnType {
|
1822 | names: string[];
|
1823 | }
|
1824 |
|
1825 | interface QueryObjectsReturnType {
|
1826 | |
1827 |
|
1828 |
|
1829 | objects: RemoteObject;
|
1830 | }
|
1831 |
|
1832 | interface RunScriptReturnType {
|
1833 | |
1834 |
|
1835 |
|
1836 | result: RemoteObject;
|
1837 | |
1838 |
|
1839 |
|
1840 | exceptionDetails?: ExceptionDetails;
|
1841 | }
|
1842 |
|
1843 | interface BindingCalledEventDataType {
|
1844 | name: string;
|
1845 | payload: string;
|
1846 | |
1847 |
|
1848 |
|
1849 | executionContextId: ExecutionContextId;
|
1850 | }
|
1851 |
|
1852 | interface ConsoleAPICalledEventDataType {
|
1853 | |
1854 |
|
1855 |
|
1856 | type: string;
|
1857 | |
1858 |
|
1859 |
|
1860 | args: RemoteObject[];
|
1861 | |
1862 |
|
1863 |
|
1864 | executionContextId: ExecutionContextId;
|
1865 | |
1866 |
|
1867 |
|
1868 | timestamp: Timestamp;
|
1869 | |
1870 |
|
1871 |
|
1872 | stackTrace?: StackTrace;
|
1873 | |
1874 |
|
1875 |
|
1876 |
|
1877 |
|
1878 |
|
1879 | context?: string;
|
1880 | }
|
1881 |
|
1882 | interface ExceptionRevokedEventDataType {
|
1883 | |
1884 |
|
1885 |
|
1886 | reason: string;
|
1887 | |
1888 |
|
1889 |
|
1890 | exceptionId: number;
|
1891 | }
|
1892 |
|
1893 | interface ExceptionThrownEventDataType {
|
1894 | |
1895 |
|
1896 |
|
1897 | timestamp: Timestamp;
|
1898 | exceptionDetails: ExceptionDetails;
|
1899 | }
|
1900 |
|
1901 | interface ExecutionContextCreatedEventDataType {
|
1902 | |
1903 |
|
1904 |
|
1905 | context: ExecutionContextDescription;
|
1906 | }
|
1907 |
|
1908 | interface ExecutionContextDestroyedEventDataType {
|
1909 | |
1910 |
|
1911 |
|
1912 | executionContextId: ExecutionContextId;
|
1913 | }
|
1914 |
|
1915 | interface InspectRequestedEventDataType {
|
1916 | object: RemoteObject;
|
1917 | hints: {};
|
1918 | }
|
1919 | }
|
1920 |
|
1921 | namespace Schema {
|
1922 | |
1923 |
|
1924 |
|
1925 | interface Domain {
|
1926 | |
1927 |
|
1928 |
|
1929 | name: string;
|
1930 | |
1931 |
|
1932 |
|
1933 | version: string;
|
1934 | }
|
1935 |
|
1936 | interface GetDomainsReturnType {
|
1937 | |
1938 |
|
1939 |
|
1940 | domains: Domain[];
|
1941 | }
|
1942 | }
|
1943 |
|
1944 | namespace NodeTracing {
|
1945 | interface TraceConfig {
|
1946 | |
1947 |
|
1948 |
|
1949 | recordMode?: string;
|
1950 | |
1951 |
|
1952 |
|
1953 | includedCategories: string[];
|
1954 | }
|
1955 |
|
1956 | interface StartParameterType {
|
1957 | traceConfig: TraceConfig;
|
1958 | }
|
1959 |
|
1960 | interface GetCategoriesReturnType {
|
1961 | |
1962 |
|
1963 |
|
1964 | categories: string[];
|
1965 | }
|
1966 |
|
1967 | interface DataCollectedEventDataType {
|
1968 | value: Array<{}>;
|
1969 | }
|
1970 | }
|
1971 |
|
1972 | namespace NodeWorker {
|
1973 | type WorkerID = string;
|
1974 |
|
1975 | |
1976 |
|
1977 |
|
1978 | type SessionID = string;
|
1979 |
|
1980 | interface WorkerInfo {
|
1981 | workerId: WorkerID;
|
1982 | type: string;
|
1983 | title: string;
|
1984 | url: string;
|
1985 | }
|
1986 |
|
1987 | interface SendMessageToWorkerParameterType {
|
1988 | message: string;
|
1989 | |
1990 |
|
1991 |
|
1992 | sessionId: SessionID;
|
1993 | }
|
1994 |
|
1995 | interface EnableParameterType {
|
1996 | |
1997 |
|
1998 |
|
1999 |
|
2000 | waitForDebuggerOnStart: boolean;
|
2001 | }
|
2002 |
|
2003 | interface AttachedToWorkerEventDataType {
|
2004 | |
2005 |
|
2006 |
|
2007 | sessionId: SessionID;
|
2008 | workerInfo: WorkerInfo;
|
2009 | waitingForDebugger: boolean;
|
2010 | }
|
2011 |
|
2012 | interface DetachedFromWorkerEventDataType {
|
2013 | |
2014 |
|
2015 |
|
2016 | sessionId: SessionID;
|
2017 | }
|
2018 |
|
2019 | interface ReceivedMessageFromWorkerEventDataType {
|
2020 | |
2021 |
|
2022 |
|
2023 | sessionId: SessionID;
|
2024 | message: string;
|
2025 | }
|
2026 | }
|
2027 |
|
2028 | |
2029 |
|
2030 |
|
2031 | class Session extends EventEmitter {
|
2032 | |
2033 |
|
2034 |
|
2035 |
|
2036 | constructor();
|
2037 |
|
2038 | /**
|
2039 | * Connects a session to the inspector back-end.
|
2040 | * An exception will be thrown if there is already a connected session established either
|
2041 | * through the API or by a front-end connected to the Inspector WebSocket port.
|
2042 | */
|
2043 | connect(): void;
|
2044 |
|
2045 | /**
|
2046 | * Immediately close the session. All pending message callbacks will be called with an error.
|
2047 | * session.connect() will need to be called to be able to send messages again.
|
2048 | * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
|
2049 | */
|
2050 | disconnect(): void;
|
2051 |
|
2052 | /**
|
2053 | * Posts a message to the inspector back-end. callback will be notified when a response is received.
|
2054 | * callback is a function that accepts two optional arguments - error and message-specific result.
|
2055 | */
|
2056 | post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void;
|
2057 | post(method: string, callback?: (err: Error | null, params?: {}) => void): void;
|
2058 |
|
2059 | /**
|
2060 | * Does nothing.
|
2061 | */
|
2062 | post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void;
|
2063 |
|
2064 | /**
|
2065 | * Disables console domain, prevents further console messages from being reported to the client.
|
2066 | */
|
2067 | post(method: "Console.disable", callback?: (err: Error | null) => void): void;
|
2068 |
|
2069 | /**
|
2070 | * Enables console domain, sends the messages collected so far to the client by means of the
|
2071 | * `messageAdded` notification.
|
2072 | */
|
2073 | post(method: "Console.enable", callback?: (err: Error | null) => void): void;
|
2074 |
|
2075 | /**
|
2076 | * Continues execution until specific location is reached.
|
2077 | */
|
2078 | post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
|
2079 | post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void;
|
2080 |
|
2081 | /**
|
2082 | * Disables debugger for given page.
|
2083 | */
|
2084 | post(method: "Debugger.disable", callback?: (err: Error | null) => void): void;
|
2085 |
|
2086 | /**
|
2087 | * Enables debugger for the given page. Clients should not assume that the debugging has been
|
2088 | * enabled until the result for this command is received.
|
2089 | */
|
2090 | post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void;
|
2091 |
|
2092 | /**
|
2093 | * Evaluates expression on a given call frame.
|
2094 | */
|
2095 | post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
|
2096 | post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
|
2097 |
|
2098 | /**
|
2099 | * Returns possible locations for breakpoint. scriptId in start and end range locations should be
|
2100 | * the same.
|
2101 | */
|
2102 | post(
|
2103 | method: "Debugger.getPossibleBreakpoints",
|
2104 | params?: Debugger.GetPossibleBreakpointsParameterType,
|
2105 | callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void
|
2106 | ): void;
|
2107 | post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
|
2108 |
|
2109 | /**
|
2110 | * Returns source for the script with given id.
|
2111 | */
|
2112 | post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
|
2113 | post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
|
2114 |
|
2115 | /**
|
2116 | * Returns stack trace with given `stackTraceId`.
|
2117 | * @experimental
|
2118 | */
|
2119 | post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
|
2120 | post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
|
2121 |
|
2122 | /**
|
2123 | * Stops on the next JavaScript statement.
|
2124 | */
|
2125 | post(method: "Debugger.pause", callback?: (err: Error | null) => void): void;
|
2126 |
|
2127 | /**
|
2128 | * @experimental
|
2129 | */
|
2130 | post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void;
|
2131 | post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void;
|
2132 |
|
2133 | /**
|
2134 | * Removes JavaScript breakpoint.
|
2135 | */
|
2136 | post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
|
2137 | post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void;
|
2138 |
|
2139 | /**
|
2140 | * Restarts particular call frame from the beginning.
|
2141 | */
|
2142 | post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
|
2143 | post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
|
2144 |
|
2145 | /**
|
2146 | * Resumes JavaScript execution.
|
2147 | */
|
2148 | post(method: "Debugger.resume", callback?: (err: Error | null) => void): void;
|
2149 |
|
2150 | /**
|
2151 | * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and
|
2152 | * Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled
|
2153 | * before next pause. Returns success when async task is actually scheduled, returns error if no
|
2154 | * task were scheduled or another scheduleStepIntoAsync was called.
|
2155 | * @experimental
|
2156 | */
|
2157 | post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void;
|
2158 |
|
2159 | /**
|
2160 | * Searches for given string in script content.
|
2161 | */
|
2162 | post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
|
2163 | post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
|
2164 |
|
2165 | /**
|
2166 | * Enables or disables async call stacks tracking.
|
2167 | */
|
2168 | post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
|
2169 | post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void;
|
2170 |
|
2171 | /**
|
2172 | * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
|
2173 | * scripts with url matching one of the patterns. VM will try to leave blackboxed script by
|
2174 | * performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
|
2175 | * @experimental
|
2176 | */
|
2177 | post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
|
2178 | post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void;
|
2179 |
|
2180 | /**
|
2181 | * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
|
2182 | * scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
|
2183 | * Positions array contains positions where blackbox state is changed. First interval isn't
|
2184 | * blackboxed. Array should be sorted.
|
2185 | * @experimental
|
2186 | */
|
2187 | post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
|
2188 | post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void;
|
2189 |
|
2190 | /**
|
2191 | * Sets JavaScript breakpoint at a given location.
|
2192 | */
|
2193 | post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
|
2194 | post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
|
2195 |
|
2196 | /**
|
2197 | * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
|
2198 | * command is issued, all existing parsed scripts will have breakpoints resolved and returned in
|
2199 | * `locations` property. Further matching script parsing will result in subsequent
|
2200 | * `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
|
2201 | */
|
2202 | post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
|
2203 | post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
|
2204 |
|
2205 | /**
|
2206 | * Sets JavaScript breakpoint before each call to the given function.
|
2207 | * If another function was created from the same source as a given one,
|
2208 | * calling it will also trigger the breakpoint.
|
2209 | * @experimental
|
2210 | */
|
2211 | post(
|
2212 | method: "Debugger.setBreakpointOnFunctionCall",
|
2213 | params?: Debugger.SetBreakpointOnFunctionCallParameterType,
|
2214 | callback?: (err: Error | null, params: Debugger.SetBreakpointOnFunctionCallReturnType) => void
|
2215 | ): void;
|
2216 | post(method: "Debugger.setBreakpointOnFunctionCall", callback?: (err: Error | null, params: Debugger.SetBreakpointOnFunctionCallReturnType) => void): void;
|
2217 |
|
2218 | /**
|
2219 | * Activates / deactivates all breakpoints on the page.
|
2220 | */
|
2221 | post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void;
|
2222 | post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void;
|
2223 |
|
2224 | /**
|
2225 | * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or
|
2226 | * no exceptions. Initial pause on exceptions state is `none`.
|
2227 | */
|
2228 | post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
|
2229 | post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void;
|
2230 |
|
2231 | /**
|
2232 | * Changes return value in top frame. Available only at return break position.
|
2233 | * @experimental
|
2234 | */
|
2235 | post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void;
|
2236 | post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void;
|
2237 |
|
2238 | /**
|
2239 | * Edits JavaScript source live.
|
2240 | */
|
2241 | post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
|
2242 | post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
|
2243 |
|
2244 | /**
|
2245 | * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
|
2246 | */
|
2247 | post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void;
|
2248 | post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void;
|
2249 |
|
2250 | /**
|
2251 | * Changes value of variable in a callframe. Object-based scopes are not supported and must be
|
2252 | * mutated manually.
|
2253 | */
|
2254 | post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
|
2255 | post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void;
|
2256 |
|
2257 | /**
|
2258 | * Steps into the function call.
|
2259 | */
|
2260 | post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void;
|
2261 | post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void;
|
2262 |
|
2263 | /**
|
2264 | * Steps out of the function call.
|
2265 | */
|
2266 | post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void;
|
2267 |
|
2268 | /**
|
2269 | * Steps over the statement.
|
2270 | */
|
2271 | post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void;
|
2272 |
|
2273 | /**
|
2274 | * Enables console to refer to the node with given id via $x (see Command Line API for more details
|
2275 | * $x functions).
|
2276 | */
|
2277 | post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
|
2278 | post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void;
|
2279 |
|
2280 | post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void;
|
2281 |
|
2282 | post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void;
|
2283 |
|
2284 | post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void;
|
2285 |
|
2286 | post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
|
2287 | post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
|
2288 |
|
2289 | post(
|
2290 | method: "HeapProfiler.getObjectByHeapObjectId",
|
2291 | params?: HeapProfiler.GetObjectByHeapObjectIdParameterType,
|
2292 | callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void
|
2293 | ): void;
|
2294 | post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
|
2295 |
|
2296 | post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void;
|
2297 |
|
2298 | post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
|
2299 | post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void;
|
2300 |
|
2301 | post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
|
2302 | post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void;
|
2303 |
|
2304 | post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
|
2305 |
|
2306 | post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
|
2307 | post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void;
|
2308 |
|
2309 | post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
|
2310 | post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void;
|
2311 |
|
2312 | post(method: "Profiler.disable", callback?: (err: Error | null) => void): void;
|
2313 |
|
2314 | post(method: "Profiler.enable", callback?: (err: Error | null) => void): void;
|
2315 |
|
2316 | /**
|
2317 | * Collect coverage data for the current isolate. The coverage data may be incomplete due to
|
2318 | * garbage collection.
|
2319 | */
|
2320 | post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
|
2321 |
|
2322 | /**
|
2323 | * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
|
2324 | */
|
2325 | post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
|
2326 | post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void;
|
2327 |
|
2328 | post(method: "Profiler.start", callback?: (err: Error | null) => void): void;
|
2329 |
|
2330 | /**
|
2331 | * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
|
2332 | * coverage may be incomplete. Enabling prevents running optimized code and resets execution
|
2333 | * counters.
|
2334 | */
|
2335 | post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
|
2336 | post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void;
|
2337 |
|
2338 | /**
|
2339 | * Enable type profile.
|
2340 | * @experimental
|
2341 | */
|
2342 | post(method: "Profiler.startTypeProfile", callback?: (err: Error | null) => void): void;
|
2343 |
|
2344 | post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
|
2345 |
|
2346 | /**
|
2347 | * Disable precise code coverage. Disabling releases unnecessary execution count records and allows
|
2348 | * executing optimized code.
|
2349 | */
|
2350 | post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void;
|
2351 |
|
2352 | /**
|
2353 | * Disable type profile. Disabling releases type profile data collected so far.
|
2354 | * @experimental
|
2355 | */
|
2356 | post(method: "Profiler.stopTypeProfile", callback?: (err: Error | null) => void): void;
|
2357 |
|
2358 | /**
|
2359 | * Collect coverage data for the current isolate, and resets execution counters. Precise code
|
2360 | * coverage needs to have started.
|
2361 | */
|
2362 | post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
|
2363 |
|
2364 | /**
|
2365 | * Collect type profile.
|
2366 | * @experimental
|
2367 | */
|
2368 | post(method: "Profiler.takeTypeProfile", callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void;
|
2369 |
|
2370 | /**
|
2371 | * Add handler to promise with given promise object id.
|
2372 | */
|
2373 | post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
|
2374 | post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
|
2375 |
|
2376 | /**
|
2377 | * Calls function with given declaration on the given object. Object group of the result is
|
2378 | * inherited from the target object.
|
2379 | */
|
2380 | post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
|
2381 | post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
|
2382 |
|
2383 | /**
|
2384 | * Compiles expression.
|
2385 | */
|
2386 | post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
|
2387 | post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
|
2388 |
|
2389 | /**
|
2390 | * Disables reporting of execution contexts creation.
|
2391 | */
|
2392 | post(method: "Runtime.disable", callback?: (err: Error | null) => void): void;
|
2393 |
|
2394 | /**
|
2395 | * Discards collected exceptions and console API calls.
|
2396 | */
|
2397 | post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void;
|
2398 |
|
2399 | /**
|
2400 | * Enables reporting of execution contexts creation by means of `executionContextCreated` event.
|
2401 | * When the reporting gets enabled the event will be sent immediately for each existing execution
|
2402 | * context.
|
2403 | */
|
2404 | post(method: "Runtime.enable", callback?: (err: Error | null) => void): void;
|
2405 |
|
2406 | /**
|
2407 | * Evaluates expression on global object.
|
2408 | */
|
2409 | post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
|
2410 | post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
|
2411 |
|
2412 | /**
|
2413 | * Returns the isolate id.
|
2414 | * @experimental
|
2415 | */
|
2416 | post(method: "Runtime.getIsolateId", callback?: (err: Error | null, params: Runtime.GetIsolateIdReturnType) => void): void;
|
2417 |
|
2418 | /**
|
2419 | * Returns the JavaScript heap usage.
|
2420 | * It is the total usage of the corresponding isolate not scoped to a particular Runtime.
|
2421 | * @experimental
|
2422 | */
|
2423 | post(method: "Runtime.getHeapUsage", callback?: (err: Error | null, params: Runtime.GetHeapUsageReturnType) => void): void;
|
2424 |
|
2425 | /**
|
2426 | * Returns properties of a given object. Object group of the result is inherited from the target
|
2427 | * object.
|
2428 | */
|
2429 | post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
|
2430 | post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
|
2431 |
|
2432 | /**
|
2433 | * Returns all let, const and class variables from global scope.
|
2434 | */
|
2435 | post(
|
2436 | method: "Runtime.globalLexicalScopeNames",
|
2437 | params?: Runtime.GlobalLexicalScopeNamesParameterType,
|
2438 | callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void
|
2439 | ): void;
|
2440 | post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void;
|
2441 |
|
2442 | post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
|
2443 | post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
|
2444 |
|
2445 | /**
|
2446 | * Releases remote object with given id.
|
2447 | */
|
2448 | post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
|
2449 | post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void;
|
2450 |
|
2451 | /**
|
2452 | * Releases all remote objects that belong to a given group.
|
2453 | */
|
2454 | post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
|
2455 | post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void;
|
2456 |
|
2457 | /**
|
2458 | * Tells inspected instance to run if it was waiting for debugger to attach.
|
2459 | */
|
2460 | post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void;
|
2461 |
|
2462 | /**
|
2463 | * Runs script with given id in a given context.
|
2464 | */
|
2465 | post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
|
2466 | post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
|
2467 |
|
2468 | /**
|
2469 | * Enables or disables async call stacks tracking.
|
2470 | */
|
2471 | post(method: "Runtime.setAsyncCallStackDepth", params?: Runtime.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
|
2472 | post(method: "Runtime.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void;
|
2473 |
|
2474 | /**
|
2475 | * @experimental
|
2476 | */
|
2477 | post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
|
2478 | post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void;
|
2479 |
|
2480 | /**
|
2481 | * @experimental
|
2482 | */
|
2483 | post(method: "Runtime.setMaxCallStackSizeToCapture", params?: Runtime.SetMaxCallStackSizeToCaptureParameterType, callback?: (err: Error | null) => void): void;
|
2484 | post(method: "Runtime.setMaxCallStackSizeToCapture", callback?: (err: Error | null) => void): void;
|
2485 |
|
2486 | /**
|
2487 | * Terminate current or next JavaScript execution.
|
2488 | * Will cancel the termination when the outer-most script execution ends.
|
2489 | * @experimental
|
2490 | */
|
2491 | post(method: "Runtime.terminateExecution", callback?: (err: Error | null) => void): void;
|
2492 |
|
2493 | /**
|
2494 | * If executionContextId is empty, adds binding with the given name on the
|
2495 | * global objects of all inspected contexts, including those created later,
|
2496 | * bindings survive reloads.
|
2497 | * If executionContextId is specified, adds binding only on global object of
|
2498 | * given execution context.
|
2499 | * Binding function takes exactly one argument, this argument should be string,
|
2500 | * in case of any other input, function throws an exception.
|
2501 | * Each binding function call produces Runtime.bindingCalled notification.
|
2502 | * @experimental
|
2503 | */
|
2504 | post(method: "Runtime.addBinding", params?: Runtime.AddBindingParameterType, callback?: (err: Error | null) => void): void;
|
2505 | post(method: "Runtime.addBinding", callback?: (err: Error | null) => void): void;
|
2506 |
|
2507 | /**
|
2508 | * This method does not remove binding function from global object but
|
2509 | * unsubscribes current runtime agent from Runtime.bindingCalled notifications.
|
2510 | * @experimental
|
2511 | */
|
2512 | post(method: "Runtime.removeBinding", params?: Runtime.RemoveBindingParameterType, callback?: (err: Error | null) => void): void;
|
2513 | post(method: "Runtime.removeBinding", callback?: (err: Error | null) => void): void;
|
2514 |
|
2515 | /**
|
2516 | * Returns supported domains.
|
2517 | */
|
2518 | post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
|
2519 |
|
2520 | /**
|
2521 | * Gets supported tracing categories.
|
2522 | */
|
2523 | post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void;
|
2524 |
|
2525 | /**
|
2526 | * Start trace events collection.
|
2527 | */
|
2528 | post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void;
|
2529 | post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void;
|
2530 |
|
2531 | /**
|
2532 | * Stop trace events collection. Remaining collected events will be sent as a sequence of
|
2533 | * dataCollected events followed by tracingComplete event.
|
2534 | */
|
2535 | post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void;
|
2536 |
|
2537 | /**
|
2538 | * Sends protocol message over session with given id.
|
2539 | */
|
2540 | post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void;
|
2541 | post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void;
|
2542 |
|
2543 | /**
|
2544 | * Instructs the inspector to attach to running workers. Will also attach to new workers
|
2545 | * as they start
|
2546 | */
|
2547 | post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void;
|
2548 | post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void;
|
2549 |
|
2550 | /**
|
2551 | * Detaches from all running workers and disables attaching to new workers as they are started.
|
2552 | */
|
2553 | post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void;
|
2554 |
|
2555 | // Events
|
2556 |
|
2557 | addListener(event: string, listener: (...args: any[]) => void): this;
|
2558 |
|
2559 | /**
|
2560 | * Emitted when any notification from the V8 Inspector is received.
|
2561 | */
|
2562 | addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
|
2563 |
|
2564 | /**
|
2565 | * Issued when new console message is added.
|
2566 | */
|
2567 | addListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
2568 |
|
2569 | /**
|
2570 | * Fired when breakpoint is resolved to an actual script and location.
|
2571 | */
|
2572 | addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
2573 |
|
2574 | /**
|
2575 | * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
2576 | */
|
2577 | addListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
2578 |
|
2579 | /**
|
2580 | * Fired when the virtual machine resumed execution.
|
2581 | */
|
2582 | addListener(event: "Debugger.resumed", listener: () => void): this;
|
2583 |
|
2584 | /**
|
2585 | * Fired when virtual machine fails to parse the script.
|
2586 | */
|
2587 | addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
2588 |
|
2589 | /**
|
2590 | * Fired when virtual machine parses script. This event is also fired for all known and uncollected
|
2591 | * scripts upon enabling debugger.
|
2592 | */
|
2593 | addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
2594 |
|
2595 | addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
2596 |
|
2597 | /**
|
2598 | * If heap objects tracking has been started then backend may send update for one or more fragments
|
2599 | */
|
2600 | addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
2601 |
|
2602 | /**
|
2603 | * If heap objects tracking has been started then backend regularly sends a current value for last
|
2604 | * seen object id and corresponding timestamp. If the were changes in the heap since last event
|
2605 | * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
|
2606 | */
|
2607 | addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
2608 |
|
2609 | addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
2610 | addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
|
2611 | addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
2612 |
|
2613 | /**
|
2614 | * Sent when new profile recording is started using console.profile() call.
|
2615 | */
|
2616 | addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
2617 |
|
2618 | /**
|
2619 | * Notification is issued every time when binding is called.
|
2620 | * @experimental
|
2621 | */
|
2622 | addListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
|
2623 |
|
2624 | /**
|
2625 | * Issued when console API was called.
|
2626 | */
|
2627 | addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
2628 |
|
2629 | /**
|
2630 | * Issued when unhandled exception was revoked.
|
2631 | */
|
2632 | addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
2633 |
|
2634 | /**
|
2635 | * Issued when exception was thrown and unhandled.
|
2636 | */
|
2637 | addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
2638 |
|
2639 | /**
|
2640 | * Issued when new execution context is created.
|
2641 | */
|
2642 | addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
2643 |
|
2644 | /**
|
2645 | * Issued when execution context is destroyed.
|
2646 | */
|
2647 | addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
2648 |
|
2649 | /**
|
2650 | * Issued when all executionContexts were cleared in browser
|
2651 | */
|
2652 | addListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
|
2653 |
|
2654 | /**
|
2655 | * Issued when object should be inspected (for example, as a result of inspect() command line API
|
2656 | * call).
|
2657 | */
|
2658 | addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
2659 |
|
2660 | /**
|
2661 | * Contains an bucket of collected trace events.
|
2662 | */
|
2663 | addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
|
2664 |
|
2665 | /**
|
2666 | * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
|
2667 | * delivered via dataCollected events.
|
2668 | */
|
2669 | addListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
|
2670 |
|
2671 | /**
|
2672 | * Issued when attached to a worker.
|
2673 | */
|
2674 | addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
|
2675 |
|
2676 | /**
|
2677 | * Issued when detached from the worker.
|
2678 | */
|
2679 | addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
|
2680 |
|
2681 | /**
|
2682 | * Notifies about a new protocol message received from the session
|
2683 | * (session ID is provided in attachedToWorker notification).
|
2684 | */
|
2685 | addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
|
2686 |
|
2687 | emit(event: string | symbol, ...args: any[]): boolean;
|
2688 | emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean;
|
2689 | emit(event: "Console.messageAdded", message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
|
2690 | emit(event: "Debugger.breakpointResolved", message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
|
2691 | emit(event: "Debugger.paused", message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
|
2692 | emit(event: "Debugger.resumed"): boolean;
|
2693 | emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
|
2694 | emit(event: "Debugger.scriptParsed", message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
|
2695 | emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
|
2696 | emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
|
2697 | emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
|
2698 | emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
|
2699 | emit(event: "HeapProfiler.resetProfiles"): boolean;
|
2700 | emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
|
2701 | emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
|
2702 | emit(event: "Runtime.bindingCalled", message: InspectorNotification<Runtime.BindingCalledEventDataType>): boolean;
|
2703 | emit(event: "Runtime.consoleAPICalled", message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
|
2704 | emit(event: "Runtime.exceptionRevoked", message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
|
2705 | emit(event: "Runtime.exceptionThrown", message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
|
2706 | emit(event: "Runtime.executionContextCreated", message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
|
2707 | emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
|
2708 | emit(event: "Runtime.executionContextsCleared"): boolean;
|
2709 | emit(event: "Runtime.inspectRequested", message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
|
2710 | emit(event: "NodeTracing.dataCollected", message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
|
2711 | emit(event: "NodeTracing.tracingComplete"): boolean;
|
2712 | emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
|
2713 | emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
|
2714 | emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
|
2715 |
|
2716 | on(event: string, listener: (...args: any[]) => void): this;
|
2717 |
|
2718 | /**
|
2719 | * Emitted when any notification from the V8 Inspector is received.
|
2720 | */
|
2721 | on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
|
2722 |
|
2723 | /**
|
2724 | * Issued when new console message is added.
|
2725 | */
|
2726 | on(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
2727 |
|
2728 | /**
|
2729 | * Fired when breakpoint is resolved to an actual script and location.
|
2730 | */
|
2731 | on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
2732 |
|
2733 | /**
|
2734 | * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
2735 | */
|
2736 | on(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
2737 |
|
2738 | /**
|
2739 | * Fired when the virtual machine resumed execution.
|
2740 | */
|
2741 | on(event: "Debugger.resumed", listener: () => void): this;
|
2742 |
|
2743 | /**
|
2744 | * Fired when virtual machine fails to parse the script.
|
2745 | */
|
2746 | on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
2747 |
|
2748 | /**
|
2749 | * Fired when virtual machine parses script. This event is also fired for all known and uncollected
|
2750 | * scripts upon enabling debugger.
|
2751 | */
|
2752 | on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
2753 |
|
2754 | on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
2755 |
|
2756 | /**
|
2757 | * If heap objects tracking has been started then backend may send update for one or more fragments
|
2758 | */
|
2759 | on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
2760 |
|
2761 | /**
|
2762 | * If heap objects tracking has been started then backend regularly sends a current value for last
|
2763 | * seen object id and corresponding timestamp. If the were changes in the heap since last event
|
2764 | * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
|
2765 | */
|
2766 | on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
2767 |
|
2768 | on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
2769 | on(event: "HeapProfiler.resetProfiles", listener: () => void): this;
|
2770 | on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
2771 |
|
2772 | /**
|
2773 | * Sent when new profile recording is started using console.profile() call.
|
2774 | */
|
2775 | on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
2776 |
|
2777 | /**
|
2778 | * Notification is issued every time when binding is called.
|
2779 | * @experimental
|
2780 | */
|
2781 | on(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
|
2782 |
|
2783 | /**
|
2784 | * Issued when console API was called.
|
2785 | */
|
2786 | on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
2787 |
|
2788 | /**
|
2789 | * Issued when unhandled exception was revoked.
|
2790 | */
|
2791 | on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
2792 |
|
2793 | /**
|
2794 | * Issued when exception was thrown and unhandled.
|
2795 | */
|
2796 | on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
2797 |
|
2798 | /**
|
2799 | * Issued when new execution context is created.
|
2800 | */
|
2801 | on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
2802 |
|
2803 | /**
|
2804 | * Issued when execution context is destroyed.
|
2805 | */
|
2806 | on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
2807 |
|
2808 | /**
|
2809 | * Issued when all executionContexts were cleared in browser
|
2810 | */
|
2811 | on(event: "Runtime.executionContextsCleared", listener: () => void): this;
|
2812 |
|
2813 | /**
|
2814 | * Issued when object should be inspected (for example, as a result of inspect() command line API
|
2815 | * call).
|
2816 | */
|
2817 | on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
2818 |
|
2819 | /**
|
2820 | * Contains an bucket of collected trace events.
|
2821 | */
|
2822 | on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
|
2823 |
|
2824 | /**
|
2825 | * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
|
2826 | * delivered via dataCollected events.
|
2827 | */
|
2828 | on(event: "NodeTracing.tracingComplete", listener: () => void): this;
|
2829 |
|
2830 | /**
|
2831 | * Issued when attached to a worker.
|
2832 | */
|
2833 | on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
|
2834 |
|
2835 | /**
|
2836 | * Issued when detached from the worker.
|
2837 | */
|
2838 | on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
|
2839 |
|
2840 | /**
|
2841 | * Notifies about a new protocol message received from the session
|
2842 | * (session ID is provided in attachedToWorker notification).
|
2843 | */
|
2844 | on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
|
2845 |
|
2846 | once(event: string, listener: (...args: any[]) => void): this;
|
2847 |
|
2848 | /**
|
2849 | * Emitted when any notification from the V8 Inspector is received.
|
2850 | */
|
2851 | once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
|
2852 |
|
2853 | /**
|
2854 | * Issued when new console message is added.
|
2855 | */
|
2856 | once(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
2857 |
|
2858 | /**
|
2859 | * Fired when breakpoint is resolved to an actual script and location.
|
2860 | */
|
2861 | once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
2862 |
|
2863 | /**
|
2864 | * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
2865 | */
|
2866 | once(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
2867 |
|
2868 | /**
|
2869 | * Fired when the virtual machine resumed execution.
|
2870 | */
|
2871 | once(event: "Debugger.resumed", listener: () => void): this;
|
2872 |
|
2873 | /**
|
2874 | * Fired when virtual machine fails to parse the script.
|
2875 | */
|
2876 | once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
2877 |
|
2878 | /**
|
2879 | * Fired when virtual machine parses script. This event is also fired for all known and uncollected
|
2880 | * scripts upon enabling debugger.
|
2881 | */
|
2882 | once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
2883 |
|
2884 | once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
2885 |
|
2886 | /**
|
2887 | * If heap objects tracking has been started then backend may send update for one or more fragments
|
2888 | */
|
2889 | once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
2890 |
|
2891 | /**
|
2892 | * If heap objects tracking has been started then backend regularly sends a current value for last
|
2893 | * seen object id and corresponding timestamp. If the were changes in the heap since last event
|
2894 | * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
|
2895 | */
|
2896 | once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
2897 |
|
2898 | once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
2899 | once(event: "HeapProfiler.resetProfiles", listener: () => void): this;
|
2900 | once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
2901 |
|
2902 | /**
|
2903 | * Sent when new profile recording is started using console.profile() call.
|
2904 | */
|
2905 | once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
2906 |
|
2907 | /**
|
2908 | * Notification is issued every time when binding is called.
|
2909 | * @experimental
|
2910 | */
|
2911 | once(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
|
2912 |
|
2913 | /**
|
2914 | * Issued when console API was called.
|
2915 | */
|
2916 | once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
2917 |
|
2918 | /**
|
2919 | * Issued when unhandled exception was revoked.
|
2920 | */
|
2921 | once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
2922 |
|
2923 | /**
|
2924 | * Issued when exception was thrown and unhandled.
|
2925 | */
|
2926 | once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
2927 |
|
2928 | /**
|
2929 | * Issued when new execution context is created.
|
2930 | */
|
2931 | once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
2932 |
|
2933 | /**
|
2934 | * Issued when execution context is destroyed.
|
2935 | */
|
2936 | once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
2937 |
|
2938 | /**
|
2939 | * Issued when all executionContexts were cleared in browser
|
2940 | */
|
2941 | once(event: "Runtime.executionContextsCleared", listener: () => void): this;
|
2942 |
|
2943 | /**
|
2944 | * Issued when object should be inspected (for example, as a result of inspect() command line API
|
2945 | * call).
|
2946 | */
|
2947 | once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
2948 |
|
2949 | /**
|
2950 | * Contains an bucket of collected trace events.
|
2951 | */
|
2952 | once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
|
2953 |
|
2954 | /**
|
2955 | * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
|
2956 | * delivered via dataCollected events.
|
2957 | */
|
2958 | once(event: "NodeTracing.tracingComplete", listener: () => void): this;
|
2959 |
|
2960 | /**
|
2961 | * Issued when attached to a worker.
|
2962 | */
|
2963 | once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
|
2964 |
|
2965 | /**
|
2966 | * Issued when detached from the worker.
|
2967 | */
|
2968 | once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
|
2969 |
|
2970 | /**
|
2971 | * Notifies about a new protocol message received from the session
|
2972 | * (session ID is provided in attachedToWorker notification).
|
2973 | */
|
2974 | once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
|
2975 |
|
2976 | prependListener(event: string, listener: (...args: any[]) => void): this;
|
2977 |
|
2978 | /**
|
2979 | * Emitted when any notification from the V8 Inspector is received.
|
2980 | */
|
2981 | prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
|
2982 |
|
2983 | /**
|
2984 | * Issued when new console message is added.
|
2985 | */
|
2986 | prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
2987 |
|
2988 | /**
|
2989 | * Fired when breakpoint is resolved to an actual script and location.
|
2990 | */
|
2991 | prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
2992 |
|
2993 | /**
|
2994 | * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
2995 | */
|
2996 | prependListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
2997 |
|
2998 | /**
|
2999 | * Fired when the virtual machine resumed execution.
|
3000 | */
|
3001 | prependListener(event: "Debugger.resumed", listener: () => void): this;
|
3002 |
|
3003 | /**
|
3004 | * Fired when virtual machine fails to parse the script.
|
3005 | */
|
3006 | prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
3007 |
|
3008 | /**
|
3009 | * Fired when virtual machine parses script. This event is also fired for all known and uncollected
|
3010 | * scripts upon enabling debugger.
|
3011 | */
|
3012 | prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
3013 |
|
3014 | prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
3015 |
|
3016 | /**
|
3017 | * If heap objects tracking has been started then backend may send update for one or more fragments
|
3018 | */
|
3019 | prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
3020 |
|
3021 | /**
|
3022 | * If heap objects tracking has been started then backend regularly sends a current value for last
|
3023 | * seen object id and corresponding timestamp. If the were changes in the heap since last event
|
3024 | * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
|
3025 | */
|
3026 | prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
3027 |
|
3028 | prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
3029 | prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
|
3030 | prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
3031 |
|
3032 | /**
|
3033 | * Sent when new profile recording is started using console.profile() call.
|
3034 | */
|
3035 | prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
3036 |
|
3037 | /**
|
3038 | * Notification is issued every time when binding is called.
|
3039 | * @experimental
|
3040 | */
|
3041 | prependListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
|
3042 |
|
3043 | /**
|
3044 | * Issued when console API was called.
|
3045 | */
|
3046 | prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
3047 |
|
3048 | /**
|
3049 | * Issued when unhandled exception was revoked.
|
3050 | */
|
3051 | prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
3052 |
|
3053 | /**
|
3054 | * Issued when exception was thrown and unhandled.
|
3055 | */
|
3056 | prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
3057 |
|
3058 | /**
|
3059 | * Issued when new execution context is created.
|
3060 | */
|
3061 | prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
3062 |
|
3063 | /**
|
3064 | * Issued when execution context is destroyed.
|
3065 | */
|
3066 | prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
3067 |
|
3068 | /**
|
3069 | * Issued when all executionContexts were cleared in browser
|
3070 | */
|
3071 | prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
|
3072 |
|
3073 | /**
|
3074 | * Issued when object should be inspected (for example, as a result of inspect() command line API
|
3075 | * call).
|
3076 | */
|
3077 | prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
3078 |
|
3079 | /**
|
3080 | * Contains an bucket of collected trace events.
|
3081 | */
|
3082 | prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
|
3083 |
|
3084 | /**
|
3085 | * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
|
3086 | * delivered via dataCollected events.
|
3087 | */
|
3088 | prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
|
3089 |
|
3090 | /**
|
3091 | * Issued when attached to a worker.
|
3092 | */
|
3093 | prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
|
3094 |
|
3095 | /**
|
3096 | * Issued when detached from the worker.
|
3097 | */
|
3098 | prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
|
3099 |
|
3100 | /**
|
3101 | * Notifies about a new protocol message received from the session
|
3102 | * (session ID is provided in attachedToWorker notification).
|
3103 | */
|
3104 | prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
|
3105 |
|
3106 | prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
3107 |
|
3108 | /**
|
3109 | * Emitted when any notification from the V8 Inspector is received.
|
3110 | */
|
3111 | prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
|
3112 |
|
3113 | /**
|
3114 | * Issued when new console message is added.
|
3115 | */
|
3116 | prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
3117 |
|
3118 | /**
|
3119 | * Fired when breakpoint is resolved to an actual script and location.
|
3120 | */
|
3121 | prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
3122 |
|
3123 | /**
|
3124 | * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
3125 | */
|
3126 | prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
3127 |
|
3128 | /**
|
3129 | * Fired when the virtual machine resumed execution.
|
3130 | */
|
3131 | prependOnceListener(event: "Debugger.resumed", listener: () => void): this;
|
3132 |
|
3133 | /**
|
3134 | * Fired when virtual machine fails to parse the script.
|
3135 | */
|
3136 | prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
3137 |
|
3138 | /**
|
3139 | * Fired when virtual machine parses script. This event is also fired for all known and uncollected
|
3140 | * scripts upon enabling debugger.
|
3141 | */
|
3142 | prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
3143 |
|
3144 | prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
3145 |
|
3146 | /**
|
3147 | * If heap objects tracking has been started then backend may send update for one or more fragments
|
3148 | */
|
3149 | prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
3150 |
|
3151 | /**
|
3152 | * If heap objects tracking has been started then backend regularly sends a current value for last
|
3153 | * seen object id and corresponding timestamp. If the were changes in the heap since last event
|
3154 | * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
|
3155 | */
|
3156 | prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
3157 |
|
3158 | prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
3159 | prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
|
3160 | prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
3161 |
|
3162 | /**
|
3163 | * Sent when new profile recording is started using console.profile() call.
|
3164 | */
|
3165 | prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
3166 |
|
3167 | /**
|
3168 | * Notification is issued every time when binding is called.
|
3169 | * @experimental
|
3170 | */
|
3171 | prependOnceListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
|
3172 |
|
3173 | /**
|
3174 | * Issued when console API was called.
|
3175 | */
|
3176 | prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
3177 |
|
3178 | /**
|
3179 | * Issued when unhandled exception was revoked.
|
3180 | */
|
3181 | prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
3182 |
|
3183 | /**
|
3184 | * Issued when exception was thrown and unhandled.
|
3185 | */
|
3186 | prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
3187 |
|
3188 | /**
|
3189 | * Issued when new execution context is created.
|
3190 | */
|
3191 | prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
3192 |
|
3193 | /**
|
3194 | * Issued when execution context is destroyed.
|
3195 | */
|
3196 | prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
3197 |
|
3198 | /**
|
3199 | * Issued when all executionContexts were cleared in browser
|
3200 | */
|
3201 | prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
|
3202 |
|
3203 | /**
|
3204 | * Issued when object should be inspected (for example, as a result of inspect() command line API
|
3205 | * call).
|
3206 | */
|
3207 | prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
3208 |
|
3209 | /**
|
3210 | * Contains an bucket of collected trace events.
|
3211 | */
|
3212 | prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
|
3213 |
|
3214 | /**
|
3215 | * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
|
3216 | * delivered via dataCollected events.
|
3217 | */
|
3218 | prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
|
3219 |
|
3220 | /**
|
3221 | * Issued when attached to a worker.
|
3222 | */
|
3223 | prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
|
3224 |
|
3225 | /**
|
3226 | * Issued when detached from the worker.
|
3227 | */
|
3228 | prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
|
3229 |
|
3230 | /**
|
3231 | * Notifies about a new protocol message received from the session
|
3232 | * (session ID is provided in attachedToWorker notification).
|
3233 | */
|
3234 | prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
|
3235 | }
|
3236 |
|
3237 | // Top Level API
|
3238 |
|
3239 | /**
|
3240 | * Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programatically after node has started.
|
3241 | * If wait is true, will block until a client has connected to the inspect port and flow control has been passed to the debugger client.
|
3242 | * @param port Port to listen on for inspector connections. Optional, defaults to what was specified on the CLI.
|
3243 | * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI.
|
3244 | * @param wait Block until a client has connected. Optional, defaults to false.
|
3245 | */
|
3246 | function open(port?: number, host?: string, wait?: boolean): void;
|
3247 |
|
3248 | /**
|
3249 | * Deactivate the inspector. Blocks until there are no active connections.
|
3250 | */
|
3251 | function close(): void;
|
3252 |
|
3253 | /**
|
3254 | * Return the URL of the active inspector, or undefined if there is none.
|
3255 | */
|
3256 | function url(): string;
|
3257 | }
|