1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | declare module "inspector" {
|
11 | import { EventEmitter } from 'events';
|
12 |
|
13 | export interface InspectorNotification<T> {
|
14 | method: string;
|
15 | params: T;
|
16 | }
|
17 |
|
18 | export namespace Schema {
|
19 | |
20 |
|
21 |
|
22 | export interface Domain {
|
23 | |
24 |
|
25 |
|
26 | name: string;
|
27 | |
28 |
|
29 |
|
30 | version: string;
|
31 | }
|
32 |
|
33 | export interface GetDomainsReturnType {
|
34 | |
35 |
|
36 |
|
37 | domains: Schema.Domain[];
|
38 | }
|
39 | }
|
40 |
|
41 | export namespace Runtime {
|
42 | |
43 |
|
44 |
|
45 | export type ScriptId = string;
|
46 |
|
47 | |
48 |
|
49 |
|
50 | export type RemoteObjectId = string;
|
51 |
|
52 | |
53 |
|
54 |
|
55 | export type UnserializableValue = string;
|
56 |
|
57 | |
58 |
|
59 |
|
60 | export interface RemoteObject {
|
61 | |
62 |
|
63 |
|
64 | type: string;
|
65 | |
66 |
|
67 |
|
68 | subtype?: string;
|
69 | |
70 |
|
71 |
|
72 | className?: string;
|
73 | |
74 |
|
75 |
|
76 | value?: any;
|
77 | |
78 |
|
79 |
|
80 | unserializableValue?: Runtime.UnserializableValue;
|
81 | |
82 |
|
83 |
|
84 | description?: string;
|
85 | |
86 |
|
87 |
|
88 | objectId?: Runtime.RemoteObjectId;
|
89 | |
90 |
|
91 |
|
92 |
|
93 | preview?: Runtime.ObjectPreview;
|
94 | |
95 |
|
96 |
|
97 | customPreview?: Runtime.CustomPreview;
|
98 | }
|
99 |
|
100 | |
101 |
|
102 |
|
103 | export interface CustomPreview {
|
104 | header: string;
|
105 | hasBody: boolean;
|
106 | formatterObjectId: Runtime.RemoteObjectId;
|
107 | bindRemoteObjectFunctionId: Runtime.RemoteObjectId;
|
108 | configObjectId?: Runtime.RemoteObjectId;
|
109 | }
|
110 |
|
111 | |
112 |
|
113 |
|
114 |
|
115 | export interface ObjectPreview {
|
116 | |
117 |
|
118 |
|
119 | type: string;
|
120 | |
121 |
|
122 |
|
123 | subtype?: string;
|
124 | |
125 |
|
126 |
|
127 | description?: string;
|
128 | |
129 |
|
130 |
|
131 | overflow: boolean;
|
132 | |
133 |
|
134 |
|
135 | properties: Runtime.PropertyPreview[];
|
136 | |
137 |
|
138 |
|
139 | entries?: Runtime.EntryPreview[];
|
140 | }
|
141 |
|
142 | |
143 |
|
144 |
|
145 | export interface PropertyPreview {
|
146 | |
147 |
|
148 |
|
149 | name: string;
|
150 | |
151 |
|
152 |
|
153 | type: string;
|
154 | |
155 |
|
156 |
|
157 | value?: string;
|
158 | |
159 |
|
160 |
|
161 | valuePreview?: Runtime.ObjectPreview;
|
162 | |
163 |
|
164 |
|
165 | subtype?: string;
|
166 | }
|
167 |
|
168 | |
169 |
|
170 |
|
171 | export interface EntryPreview {
|
172 | |
173 |
|
174 |
|
175 | key?: Runtime.ObjectPreview;
|
176 | |
177 |
|
178 |
|
179 | value: Runtime.ObjectPreview;
|
180 | }
|
181 |
|
182 | |
183 |
|
184 |
|
185 | export interface PropertyDescriptor {
|
186 | |
187 |
|
188 |
|
189 | name: string;
|
190 | |
191 |
|
192 |
|
193 | value?: Runtime.RemoteObject;
|
194 | |
195 |
|
196 |
|
197 | writable?: boolean;
|
198 | |
199 |
|
200 |
|
201 | get?: Runtime.RemoteObject;
|
202 | |
203 |
|
204 |
|
205 | set?: Runtime.RemoteObject;
|
206 | |
207 |
|
208 |
|
209 | configurable: boolean;
|
210 | |
211 |
|
212 |
|
213 | enumerable: boolean;
|
214 | |
215 |
|
216 |
|
217 | wasThrown?: boolean;
|
218 | |
219 |
|
220 |
|
221 | isOwn?: boolean;
|
222 | |
223 |
|
224 |
|
225 | symbol?: Runtime.RemoteObject;
|
226 | }
|
227 |
|
228 | |
229 |
|
230 |
|
231 | export interface InternalPropertyDescriptor {
|
232 | |
233 |
|
234 |
|
235 | name: string;
|
236 | |
237 |
|
238 |
|
239 | value?: Runtime.RemoteObject;
|
240 | }
|
241 |
|
242 | |
243 |
|
244 |
|
245 | export interface CallArgument {
|
246 | |
247 |
|
248 |
|
249 | value?: any;
|
250 | |
251 |
|
252 |
|
253 | unserializableValue?: Runtime.UnserializableValue;
|
254 | |
255 |
|
256 |
|
257 | objectId?: Runtime.RemoteObjectId;
|
258 | }
|
259 |
|
260 | |
261 |
|
262 |
|
263 | export type ExecutionContextId = number;
|
264 |
|
265 | |
266 |
|
267 |
|
268 | export interface ExecutionContextDescription {
|
269 | |
270 |
|
271 |
|
272 | id: Runtime.ExecutionContextId;
|
273 | |
274 |
|
275 |
|
276 | origin: string;
|
277 | |
278 |
|
279 |
|
280 | name: string;
|
281 | |
282 |
|
283 |
|
284 | auxData?: {};
|
285 | }
|
286 |
|
287 | |
288 |
|
289 |
|
290 | export interface ExceptionDetails {
|
291 | |
292 |
|
293 |
|
294 | exceptionId: number;
|
295 | |
296 |
|
297 |
|
298 | text: string;
|
299 | |
300 |
|
301 |
|
302 | lineNumber: number;
|
303 | |
304 |
|
305 |
|
306 | columnNumber: number;
|
307 | |
308 |
|
309 |
|
310 | scriptId?: Runtime.ScriptId;
|
311 | |
312 |
|
313 |
|
314 | url?: string;
|
315 | |
316 |
|
317 |
|
318 | stackTrace?: Runtime.StackTrace;
|
319 | |
320 |
|
321 |
|
322 | exception?: Runtime.RemoteObject;
|
323 | |
324 |
|
325 |
|
326 | executionContextId?: Runtime.ExecutionContextId;
|
327 | }
|
328 |
|
329 | |
330 |
|
331 |
|
332 | export type Timestamp = number;
|
333 |
|
334 | |
335 |
|
336 |
|
337 | export interface CallFrame {
|
338 | |
339 |
|
340 |
|
341 | functionName: string;
|
342 | |
343 |
|
344 |
|
345 | scriptId: Runtime.ScriptId;
|
346 | |
347 |
|
348 |
|
349 | url: string;
|
350 | |
351 |
|
352 |
|
353 | lineNumber: number;
|
354 | |
355 |
|
356 |
|
357 | columnNumber: number;
|
358 | }
|
359 |
|
360 | |
361 |
|
362 |
|
363 | export interface StackTrace {
|
364 | |
365 |
|
366 |
|
367 | description?: string;
|
368 | |
369 |
|
370 |
|
371 | callFrames: Runtime.CallFrame[];
|
372 | |
373 |
|
374 |
|
375 | parent?: Runtime.StackTrace;
|
376 | |
377 |
|
378 |
|
379 |
|
380 | promiseCreationFrame?: Runtime.CallFrame;
|
381 | }
|
382 |
|
383 | export interface EvaluateParameterType {
|
384 | |
385 |
|
386 |
|
387 | expression: string;
|
388 | |
389 |
|
390 |
|
391 | objectGroup?: string;
|
392 | |
393 |
|
394 |
|
395 | includeCommandLineAPI?: boolean;
|
396 | |
397 |
|
398 |
|
399 | silent?: boolean;
|
400 | |
401 |
|
402 |
|
403 | contextId?: Runtime.ExecutionContextId;
|
404 | |
405 |
|
406 |
|
407 | returnByValue?: boolean;
|
408 | |
409 |
|
410 |
|
411 |
|
412 | generatePreview?: boolean;
|
413 | |
414 |
|
415 |
|
416 |
|
417 | userGesture?: boolean;
|
418 | |
419 |
|
420 |
|
421 | awaitPromise?: boolean;
|
422 | }
|
423 |
|
424 | export interface AwaitPromiseParameterType {
|
425 | |
426 |
|
427 |
|
428 | promiseObjectId: Runtime.RemoteObjectId;
|
429 | |
430 |
|
431 |
|
432 | returnByValue?: boolean;
|
433 | |
434 |
|
435 |
|
436 | generatePreview?: boolean;
|
437 | }
|
438 |
|
439 | export interface CallFunctionOnParameterType {
|
440 | |
441 |
|
442 |
|
443 | objectId: Runtime.RemoteObjectId;
|
444 | |
445 |
|
446 |
|
447 | functionDeclaration: string;
|
448 | |
449 |
|
450 |
|
451 | arguments?: Runtime.CallArgument[];
|
452 | |
453 |
|
454 |
|
455 | silent?: boolean;
|
456 | |
457 |
|
458 |
|
459 | returnByValue?: boolean;
|
460 | |
461 |
|
462 |
|
463 |
|
464 | generatePreview?: boolean;
|
465 | |
466 |
|
467 |
|
468 |
|
469 | userGesture?: boolean;
|
470 | |
471 |
|
472 |
|
473 | awaitPromise?: boolean;
|
474 | }
|
475 |
|
476 | export interface GetPropertiesParameterType {
|
477 | |
478 |
|
479 |
|
480 | objectId: Runtime.RemoteObjectId;
|
481 | |
482 |
|
483 |
|
484 | ownProperties?: boolean;
|
485 | |
486 |
|
487 |
|
488 |
|
489 | accessorPropertiesOnly?: boolean;
|
490 | |
491 |
|
492 |
|
493 |
|
494 | generatePreview?: boolean;
|
495 | }
|
496 |
|
497 | export interface ReleaseObjectParameterType {
|
498 | |
499 |
|
500 |
|
501 | objectId: Runtime.RemoteObjectId;
|
502 | }
|
503 |
|
504 | export interface ReleaseObjectGroupParameterType {
|
505 | |
506 |
|
507 |
|
508 | objectGroup: string;
|
509 | }
|
510 |
|
511 | export interface SetCustomObjectFormatterEnabledParameterType {
|
512 | enabled: boolean;
|
513 | }
|
514 |
|
515 | export interface CompileScriptParameterType {
|
516 | |
517 |
|
518 |
|
519 | expression: string;
|
520 | |
521 |
|
522 |
|
523 | sourceURL: string;
|
524 | |
525 |
|
526 |
|
527 | persistScript: boolean;
|
528 | |
529 |
|
530 |
|
531 | executionContextId?: Runtime.ExecutionContextId;
|
532 | }
|
533 |
|
534 | export interface RunScriptParameterType {
|
535 | |
536 |
|
537 |
|
538 | scriptId: Runtime.ScriptId;
|
539 | |
540 |
|
541 |
|
542 | executionContextId?: Runtime.ExecutionContextId;
|
543 | |
544 |
|
545 |
|
546 | objectGroup?: string;
|
547 | |
548 |
|
549 |
|
550 | silent?: boolean;
|
551 | |
552 |
|
553 |
|
554 | includeCommandLineAPI?: boolean;
|
555 | |
556 |
|
557 |
|
558 | returnByValue?: boolean;
|
559 | |
560 |
|
561 |
|
562 | generatePreview?: boolean;
|
563 | |
564 |
|
565 |
|
566 | awaitPromise?: boolean;
|
567 | }
|
568 |
|
569 | export interface EvaluateReturnType {
|
570 | |
571 |
|
572 |
|
573 | result: Runtime.RemoteObject;
|
574 | |
575 |
|
576 |
|
577 | exceptionDetails?: Runtime.ExceptionDetails;
|
578 | }
|
579 |
|
580 | export interface AwaitPromiseReturnType {
|
581 | |
582 |
|
583 |
|
584 | result: Runtime.RemoteObject;
|
585 | |
586 |
|
587 |
|
588 | exceptionDetails?: Runtime.ExceptionDetails;
|
589 | }
|
590 |
|
591 | export interface CallFunctionOnReturnType {
|
592 | |
593 |
|
594 |
|
595 | result: Runtime.RemoteObject;
|
596 | |
597 |
|
598 |
|
599 | exceptionDetails?: Runtime.ExceptionDetails;
|
600 | }
|
601 |
|
602 | export interface GetPropertiesReturnType {
|
603 | |
604 |
|
605 |
|
606 | result: Runtime.PropertyDescriptor[];
|
607 | |
608 |
|
609 |
|
610 | internalProperties?: Runtime.InternalPropertyDescriptor[];
|
611 | |
612 |
|
613 |
|
614 | exceptionDetails?: Runtime.ExceptionDetails;
|
615 | }
|
616 |
|
617 | export interface CompileScriptReturnType {
|
618 | |
619 |
|
620 |
|
621 | scriptId?: Runtime.ScriptId;
|
622 | |
623 |
|
624 |
|
625 | exceptionDetails?: Runtime.ExceptionDetails;
|
626 | }
|
627 |
|
628 | export interface RunScriptReturnType {
|
629 | |
630 |
|
631 |
|
632 | result: Runtime.RemoteObject;
|
633 | |
634 |
|
635 |
|
636 | exceptionDetails?: Runtime.ExceptionDetails;
|
637 | }
|
638 |
|
639 | export interface ExecutionContextCreatedEventDataType {
|
640 | |
641 |
|
642 |
|
643 | context: Runtime.ExecutionContextDescription;
|
644 | }
|
645 |
|
646 | export interface ExecutionContextDestroyedEventDataType {
|
647 | |
648 |
|
649 |
|
650 | executionContextId: Runtime.ExecutionContextId;
|
651 | }
|
652 |
|
653 | export interface ExceptionThrownEventDataType {
|
654 | |
655 |
|
656 |
|
657 | timestamp: Runtime.Timestamp;
|
658 | exceptionDetails: Runtime.ExceptionDetails;
|
659 | }
|
660 |
|
661 | export interface ExceptionRevokedEventDataType {
|
662 | |
663 |
|
664 |
|
665 | reason: string;
|
666 | |
667 |
|
668 |
|
669 | exceptionId: number;
|
670 | }
|
671 |
|
672 | export interface ConsoleAPICalledEventDataType {
|
673 | |
674 |
|
675 |
|
676 | type: string;
|
677 | |
678 |
|
679 |
|
680 | args: Runtime.RemoteObject[];
|
681 | |
682 |
|
683 |
|
684 | executionContextId: Runtime.ExecutionContextId;
|
685 | |
686 |
|
687 |
|
688 | timestamp: Runtime.Timestamp;
|
689 | |
690 |
|
691 |
|
692 | stackTrace?: Runtime.StackTrace;
|
693 | |
694 |
|
695 |
|
696 |
|
697 | context?: string;
|
698 | }
|
699 |
|
700 | export interface InspectRequestedEventDataType {
|
701 | object: Runtime.RemoteObject;
|
702 | hints: {};
|
703 | }
|
704 | }
|
705 |
|
706 | export namespace Debugger {
|
707 | |
708 |
|
709 |
|
710 | export type BreakpointId = string;
|
711 |
|
712 | |
713 |
|
714 |
|
715 | export type CallFrameId = string;
|
716 |
|
717 | |
718 |
|
719 |
|
720 | export interface Location {
|
721 | |
722 |
|
723 |
|
724 | scriptId: Runtime.ScriptId;
|
725 | |
726 |
|
727 |
|
728 | lineNumber: number;
|
729 | |
730 |
|
731 |
|
732 | columnNumber?: number;
|
733 | }
|
734 |
|
735 | |
736 |
|
737 |
|
738 |
|
739 | export interface ScriptPosition {
|
740 | lineNumber: number;
|
741 | columnNumber: number;
|
742 | }
|
743 |
|
744 | |
745 |
|
746 |
|
747 | export interface CallFrame {
|
748 | |
749 |
|
750 |
|
751 | callFrameId: Debugger.CallFrameId;
|
752 | |
753 |
|
754 |
|
755 | functionName: string;
|
756 | |
757 |
|
758 |
|
759 |
|
760 | functionLocation?: Debugger.Location;
|
761 | |
762 |
|
763 |
|
764 | location: Debugger.Location;
|
765 | |
766 |
|
767 |
|
768 | scopeChain: Debugger.Scope[];
|
769 | |
770 |
|
771 |
|
772 | this: Runtime.RemoteObject;
|
773 | |
774 |
|
775 |
|
776 | returnValue?: Runtime.RemoteObject;
|
777 | }
|
778 |
|
779 | |
780 |
|
781 |
|
782 | export interface Scope {
|
783 | |
784 |
|
785 |
|
786 | type: string;
|
787 | |
788 |
|
789 |
|
790 | object: Runtime.RemoteObject;
|
791 | name?: string;
|
792 | |
793 |
|
794 |
|
795 | startLocation?: Debugger.Location;
|
796 | |
797 |
|
798 |
|
799 | endLocation?: Debugger.Location;
|
800 | }
|
801 |
|
802 | |
803 |
|
804 |
|
805 |
|
806 | export interface SearchMatch {
|
807 | |
808 |
|
809 |
|
810 | lineNumber: number;
|
811 | |
812 |
|
813 |
|
814 | lineContent: string;
|
815 | }
|
816 |
|
817 | |
818 |
|
819 |
|
820 | export interface BreakLocation {
|
821 | |
822 |
|
823 |
|
824 | scriptId: Runtime.ScriptId;
|
825 | |
826 |
|
827 |
|
828 | lineNumber: number;
|
829 | |
830 |
|
831 |
|
832 | columnNumber?: number;
|
833 | type?: string;
|
834 | }
|
835 |
|
836 | export interface SetBreakpointsActiveParameterType {
|
837 | |
838 |
|
839 |
|
840 | active: boolean;
|
841 | }
|
842 |
|
843 | export interface SetSkipAllPausesParameterType {
|
844 | |
845 |
|
846 |
|
847 | skip: boolean;
|
848 | }
|
849 |
|
850 | export interface SetBreakpointByUrlParameterType {
|
851 | |
852 |
|
853 |
|
854 | lineNumber: number;
|
855 | |
856 |
|
857 |
|
858 | url?: string;
|
859 | |
860 |
|
861 |
|
862 | urlRegex?: string;
|
863 | |
864 |
|
865 |
|
866 | columnNumber?: number;
|
867 | |
868 |
|
869 |
|
870 | condition?: string;
|
871 | }
|
872 |
|
873 | export interface SetBreakpointParameterType {
|
874 | |
875 |
|
876 |
|
877 | location: Debugger.Location;
|
878 | |
879 |
|
880 |
|
881 | condition?: string;
|
882 | }
|
883 |
|
884 | export interface RemoveBreakpointParameterType {
|
885 | breakpointId: Debugger.BreakpointId;
|
886 | }
|
887 |
|
888 | export interface GetPossibleBreakpointsParameterType {
|
889 | |
890 |
|
891 |
|
892 | start: Debugger.Location;
|
893 | |
894 |
|
895 |
|
896 | end?: Debugger.Location;
|
897 | |
898 |
|
899 |
|
900 | restrictToFunction?: boolean;
|
901 | }
|
902 |
|
903 | export interface ContinueToLocationParameterType {
|
904 | |
905 |
|
906 |
|
907 | location: Debugger.Location;
|
908 | |
909 |
|
910 |
|
911 | targetCallFrames?: string;
|
912 | }
|
913 |
|
914 | export interface SearchInContentParameterType {
|
915 | |
916 |
|
917 |
|
918 | scriptId: Runtime.ScriptId;
|
919 | |
920 |
|
921 |
|
922 | query: string;
|
923 | |
924 |
|
925 |
|
926 | caseSensitive?: boolean;
|
927 | |
928 |
|
929 |
|
930 | isRegex?: boolean;
|
931 | }
|
932 |
|
933 | export interface SetScriptSourceParameterType {
|
934 | |
935 |
|
936 |
|
937 | scriptId: Runtime.ScriptId;
|
938 | |
939 |
|
940 |
|
941 | scriptSource: string;
|
942 | |
943 |
|
944 |
|
945 | dryRun?: boolean;
|
946 | }
|
947 |
|
948 | export interface RestartFrameParameterType {
|
949 | |
950 |
|
951 |
|
952 | callFrameId: Debugger.CallFrameId;
|
953 | }
|
954 |
|
955 | export interface GetScriptSourceParameterType {
|
956 | |
957 |
|
958 |
|
959 | scriptId: Runtime.ScriptId;
|
960 | }
|
961 |
|
962 | export interface SetPauseOnExceptionsParameterType {
|
963 | |
964 |
|
965 |
|
966 | state: string;
|
967 | }
|
968 |
|
969 | export interface EvaluateOnCallFrameParameterType {
|
970 | |
971 |
|
972 |
|
973 | callFrameId: Debugger.CallFrameId;
|
974 | |
975 |
|
976 |
|
977 | expression: string;
|
978 | |
979 |
|
980 |
|
981 | objectGroup?: string;
|
982 | |
983 |
|
984 |
|
985 | includeCommandLineAPI?: boolean;
|
986 | |
987 |
|
988 |
|
989 | silent?: boolean;
|
990 | |
991 |
|
992 |
|
993 | returnByValue?: boolean;
|
994 | |
995 |
|
996 |
|
997 |
|
998 | generatePreview?: boolean;
|
999 | |
1000 |
|
1001 |
|
1002 |
|
1003 | throwOnSideEffect?: boolean;
|
1004 | }
|
1005 |
|
1006 | export interface SetVariableValueParameterType {
|
1007 | |
1008 |
|
1009 |
|
1010 | scopeNumber: number;
|
1011 | |
1012 |
|
1013 |
|
1014 | variableName: string;
|
1015 | |
1016 |
|
1017 |
|
1018 | newValue: Runtime.CallArgument;
|
1019 | |
1020 |
|
1021 |
|
1022 | callFrameId: Debugger.CallFrameId;
|
1023 | }
|
1024 |
|
1025 | export interface SetAsyncCallStackDepthParameterType {
|
1026 | |
1027 |
|
1028 |
|
1029 | maxDepth: number;
|
1030 | }
|
1031 |
|
1032 | export interface SetBlackboxPatternsParameterType {
|
1033 | |
1034 |
|
1035 |
|
1036 | patterns: string[];
|
1037 | }
|
1038 |
|
1039 | export interface SetBlackboxedRangesParameterType {
|
1040 | |
1041 |
|
1042 |
|
1043 | scriptId: Runtime.ScriptId;
|
1044 | positions: Debugger.ScriptPosition[];
|
1045 | }
|
1046 |
|
1047 | export interface SetBreakpointByUrlReturnType {
|
1048 | |
1049 |
|
1050 |
|
1051 | breakpointId: Debugger.BreakpointId;
|
1052 | |
1053 |
|
1054 |
|
1055 | locations: Debugger.Location[];
|
1056 | }
|
1057 |
|
1058 | export interface SetBreakpointReturnType {
|
1059 | |
1060 |
|
1061 |
|
1062 | breakpointId: Debugger.BreakpointId;
|
1063 | |
1064 |
|
1065 |
|
1066 | actualLocation: Debugger.Location;
|
1067 | }
|
1068 |
|
1069 | export interface GetPossibleBreakpointsReturnType {
|
1070 | |
1071 |
|
1072 |
|
1073 | locations: Debugger.BreakLocation[];
|
1074 | }
|
1075 |
|
1076 | export interface SearchInContentReturnType {
|
1077 | |
1078 |
|
1079 |
|
1080 | result: Debugger.SearchMatch[];
|
1081 | }
|
1082 |
|
1083 | export interface SetScriptSourceReturnType {
|
1084 | |
1085 |
|
1086 |
|
1087 | callFrames?: Debugger.CallFrame[];
|
1088 | |
1089 |
|
1090 |
|
1091 | stackChanged?: boolean;
|
1092 | |
1093 |
|
1094 |
|
1095 | asyncStackTrace?: Runtime.StackTrace;
|
1096 | |
1097 |
|
1098 |
|
1099 | exceptionDetails?: Runtime.ExceptionDetails;
|
1100 | }
|
1101 |
|
1102 | export interface RestartFrameReturnType {
|
1103 | |
1104 |
|
1105 |
|
1106 | callFrames: Debugger.CallFrame[];
|
1107 | |
1108 |
|
1109 |
|
1110 | asyncStackTrace?: Runtime.StackTrace;
|
1111 | }
|
1112 |
|
1113 | export interface GetScriptSourceReturnType {
|
1114 | |
1115 |
|
1116 |
|
1117 | scriptSource: string;
|
1118 | }
|
1119 |
|
1120 | export interface EvaluateOnCallFrameReturnType {
|
1121 | |
1122 |
|
1123 |
|
1124 | result: Runtime.RemoteObject;
|
1125 | |
1126 |
|
1127 |
|
1128 | exceptionDetails?: Runtime.ExceptionDetails;
|
1129 | }
|
1130 |
|
1131 | export interface ScriptParsedEventDataType {
|
1132 | |
1133 |
|
1134 |
|
1135 | scriptId: Runtime.ScriptId;
|
1136 | |
1137 |
|
1138 |
|
1139 | url: string;
|
1140 | |
1141 |
|
1142 |
|
1143 | startLine: number;
|
1144 | |
1145 |
|
1146 |
|
1147 | startColumn: number;
|
1148 | |
1149 |
|
1150 |
|
1151 | endLine: number;
|
1152 | |
1153 |
|
1154 |
|
1155 | endColumn: number;
|
1156 | |
1157 |
|
1158 |
|
1159 | executionContextId: Runtime.ExecutionContextId;
|
1160 | |
1161 |
|
1162 |
|
1163 | hash: string;
|
1164 | |
1165 |
|
1166 |
|
1167 | executionContextAuxData?: {};
|
1168 | |
1169 |
|
1170 |
|
1171 |
|
1172 | isLiveEdit?: boolean;
|
1173 | |
1174 |
|
1175 |
|
1176 | sourceMapURL?: string;
|
1177 | |
1178 |
|
1179 |
|
1180 |
|
1181 | hasSourceURL?: boolean;
|
1182 | |
1183 |
|
1184 |
|
1185 |
|
1186 | isModule?: boolean;
|
1187 | |
1188 |
|
1189 |
|
1190 |
|
1191 | length?: number;
|
1192 | |
1193 |
|
1194 |
|
1195 |
|
1196 | stackTrace?: Runtime.StackTrace;
|
1197 | }
|
1198 |
|
1199 | export interface ScriptFailedToParseEventDataType {
|
1200 | |
1201 |
|
1202 |
|
1203 | scriptId: Runtime.ScriptId;
|
1204 | |
1205 |
|
1206 |
|
1207 | url: string;
|
1208 | |
1209 |
|
1210 |
|
1211 | startLine: number;
|
1212 | |
1213 |
|
1214 |
|
1215 | startColumn: number;
|
1216 | |
1217 |
|
1218 |
|
1219 | endLine: number;
|
1220 | |
1221 |
|
1222 |
|
1223 | endColumn: number;
|
1224 | |
1225 |
|
1226 |
|
1227 | executionContextId: Runtime.ExecutionContextId;
|
1228 | |
1229 |
|
1230 |
|
1231 | hash: string;
|
1232 | |
1233 |
|
1234 |
|
1235 | executionContextAuxData?: {};
|
1236 | |
1237 |
|
1238 |
|
1239 | sourceMapURL?: string;
|
1240 | |
1241 |
|
1242 |
|
1243 |
|
1244 | hasSourceURL?: boolean;
|
1245 | |
1246 |
|
1247 |
|
1248 |
|
1249 | isModule?: boolean;
|
1250 | |
1251 |
|
1252 |
|
1253 |
|
1254 | length?: number;
|
1255 | |
1256 |
|
1257 |
|
1258 |
|
1259 | stackTrace?: Runtime.StackTrace;
|
1260 | }
|
1261 |
|
1262 | export interface BreakpointResolvedEventDataType {
|
1263 | |
1264 |
|
1265 |
|
1266 | breakpointId: Debugger.BreakpointId;
|
1267 | |
1268 |
|
1269 |
|
1270 | location: Debugger.Location;
|
1271 | }
|
1272 |
|
1273 | export interface PausedEventDataType {
|
1274 | |
1275 |
|
1276 |
|
1277 | callFrames: Debugger.CallFrame[];
|
1278 | |
1279 |
|
1280 |
|
1281 | reason: string;
|
1282 | |
1283 |
|
1284 |
|
1285 | data?: {};
|
1286 | |
1287 |
|
1288 |
|
1289 | hitBreakpoints?: string[];
|
1290 | |
1291 |
|
1292 |
|
1293 | asyncStackTrace?: Runtime.StackTrace;
|
1294 | }
|
1295 | }
|
1296 |
|
1297 | export namespace Console {
|
1298 | |
1299 |
|
1300 |
|
1301 | export interface ConsoleMessage {
|
1302 | |
1303 |
|
1304 |
|
1305 | source: string;
|
1306 | |
1307 |
|
1308 |
|
1309 | level: string;
|
1310 | |
1311 |
|
1312 |
|
1313 | text: string;
|
1314 | |
1315 |
|
1316 |
|
1317 | url?: string;
|
1318 | |
1319 |
|
1320 |
|
1321 | line?: number;
|
1322 | |
1323 |
|
1324 |
|
1325 | column?: number;
|
1326 | }
|
1327 |
|
1328 | export interface MessageAddedEventDataType {
|
1329 | |
1330 |
|
1331 |
|
1332 | message: Console.ConsoleMessage;
|
1333 | }
|
1334 | }
|
1335 |
|
1336 | export namespace Profiler {
|
1337 | |
1338 |
|
1339 |
|
1340 | export interface ProfileNode {
|
1341 | |
1342 |
|
1343 |
|
1344 | id: number;
|
1345 | |
1346 |
|
1347 |
|
1348 | callFrame: Runtime.CallFrame;
|
1349 | |
1350 |
|
1351 |
|
1352 |
|
1353 | hitCount?: number;
|
1354 | |
1355 |
|
1356 |
|
1357 | children?: number[];
|
1358 | |
1359 |
|
1360 |
|
1361 | deoptReason?: string;
|
1362 | |
1363 |
|
1364 |
|
1365 |
|
1366 | positionTicks?: Profiler.PositionTickInfo[];
|
1367 | }
|
1368 |
|
1369 | |
1370 |
|
1371 |
|
1372 | export interface Profile {
|
1373 | |
1374 |
|
1375 |
|
1376 | nodes: Profiler.ProfileNode[];
|
1377 | |
1378 |
|
1379 |
|
1380 | startTime: number;
|
1381 | |
1382 |
|
1383 |
|
1384 | endTime: number;
|
1385 | |
1386 |
|
1387 |
|
1388 | samples?: number[];
|
1389 | |
1390 |
|
1391 |
|
1392 | timeDeltas?: number[];
|
1393 | }
|
1394 |
|
1395 | |
1396 |
|
1397 |
|
1398 |
|
1399 | export interface PositionTickInfo {
|
1400 | |
1401 |
|
1402 |
|
1403 | line: number;
|
1404 | |
1405 |
|
1406 |
|
1407 | ticks: number;
|
1408 | }
|
1409 |
|
1410 | |
1411 |
|
1412 |
|
1413 |
|
1414 | export interface CoverageRange {
|
1415 | |
1416 |
|
1417 |
|
1418 | startOffset: number;
|
1419 | |
1420 |
|
1421 |
|
1422 | endOffset: number;
|
1423 | |
1424 |
|
1425 |
|
1426 | count: number;
|
1427 | }
|
1428 |
|
1429 | |
1430 |
|
1431 |
|
1432 |
|
1433 | export interface FunctionCoverage {
|
1434 | |
1435 |
|
1436 |
|
1437 | functionName: string;
|
1438 | |
1439 |
|
1440 |
|
1441 | ranges: Profiler.CoverageRange[];
|
1442 | |
1443 |
|
1444 |
|
1445 | isBlockCoverage: boolean;
|
1446 | }
|
1447 |
|
1448 | |
1449 |
|
1450 |
|
1451 |
|
1452 | export interface ScriptCoverage {
|
1453 | |
1454 |
|
1455 |
|
1456 | scriptId: Runtime.ScriptId;
|
1457 | |
1458 |
|
1459 |
|
1460 | url: string;
|
1461 | |
1462 |
|
1463 |
|
1464 | functions: Profiler.FunctionCoverage[];
|
1465 | }
|
1466 |
|
1467 | export interface SetSamplingIntervalParameterType {
|
1468 | |
1469 |
|
1470 |
|
1471 | interval: number;
|
1472 | }
|
1473 |
|
1474 | export interface StartPreciseCoverageParameterType {
|
1475 | |
1476 |
|
1477 |
|
1478 | callCount?: boolean;
|
1479 | }
|
1480 |
|
1481 | export interface StopReturnType {
|
1482 | |
1483 |
|
1484 |
|
1485 | profile: Profiler.Profile;
|
1486 | }
|
1487 |
|
1488 | export interface TakePreciseCoverageReturnType {
|
1489 | |
1490 |
|
1491 |
|
1492 | result: Profiler.ScriptCoverage[];
|
1493 | }
|
1494 |
|
1495 | export interface GetBestEffortCoverageReturnType {
|
1496 | |
1497 |
|
1498 |
|
1499 | result: Profiler.ScriptCoverage[];
|
1500 | }
|
1501 |
|
1502 | export interface ConsoleProfileStartedEventDataType {
|
1503 | id: string;
|
1504 | |
1505 |
|
1506 |
|
1507 | location: Debugger.Location;
|
1508 | |
1509 |
|
1510 |
|
1511 | title?: string;
|
1512 | }
|
1513 |
|
1514 | export interface ConsoleProfileFinishedEventDataType {
|
1515 | id: string;
|
1516 | |
1517 |
|
1518 |
|
1519 | location: Debugger.Location;
|
1520 | profile: Profiler.Profile;
|
1521 | |
1522 |
|
1523 |
|
1524 | title?: string;
|
1525 | }
|
1526 | }
|
1527 |
|
1528 | export namespace HeapProfiler {
|
1529 | |
1530 |
|
1531 |
|
1532 | export type HeapSnapshotObjectId = string;
|
1533 |
|
1534 | |
1535 |
|
1536 |
|
1537 | export interface SamplingHeapProfileNode {
|
1538 | |
1539 |
|
1540 |
|
1541 | callFrame: Runtime.CallFrame;
|
1542 | |
1543 |
|
1544 |
|
1545 | selfSize: number;
|
1546 | |
1547 |
|
1548 |
|
1549 | children: HeapProfiler.SamplingHeapProfileNode[];
|
1550 | }
|
1551 |
|
1552 | |
1553 |
|
1554 |
|
1555 | export interface SamplingHeapProfile {
|
1556 | head: HeapProfiler.SamplingHeapProfileNode;
|
1557 | }
|
1558 |
|
1559 | export interface StartTrackingHeapObjectsParameterType {
|
1560 | trackAllocations?: boolean;
|
1561 | }
|
1562 |
|
1563 | export interface StopTrackingHeapObjectsParameterType {
|
1564 | |
1565 |
|
1566 |
|
1567 | reportProgress?: boolean;
|
1568 | }
|
1569 |
|
1570 | export interface TakeHeapSnapshotParameterType {
|
1571 | |
1572 |
|
1573 |
|
1574 | reportProgress?: boolean;
|
1575 | }
|
1576 |
|
1577 | export interface GetObjectByHeapObjectIdParameterType {
|
1578 | objectId: HeapProfiler.HeapSnapshotObjectId;
|
1579 | |
1580 |
|
1581 |
|
1582 | objectGroup?: string;
|
1583 | }
|
1584 |
|
1585 | export interface AddInspectedHeapObjectParameterType {
|
1586 | |
1587 |
|
1588 |
|
1589 | heapObjectId: HeapProfiler.HeapSnapshotObjectId;
|
1590 | }
|
1591 |
|
1592 | export interface GetHeapObjectIdParameterType {
|
1593 | |
1594 |
|
1595 |
|
1596 | objectId: Runtime.RemoteObjectId;
|
1597 | }
|
1598 |
|
1599 | export interface StartSamplingParameterType {
|
1600 | |
1601 |
|
1602 |
|
1603 | samplingInterval?: number;
|
1604 | }
|
1605 |
|
1606 | export interface GetObjectByHeapObjectIdReturnType {
|
1607 | |
1608 |
|
1609 |
|
1610 | result: Runtime.RemoteObject;
|
1611 | }
|
1612 |
|
1613 | export interface GetHeapObjectIdReturnType {
|
1614 | |
1615 |
|
1616 |
|
1617 | heapSnapshotObjectId: HeapProfiler.HeapSnapshotObjectId;
|
1618 | }
|
1619 |
|
1620 | export interface StopSamplingReturnType {
|
1621 | |
1622 |
|
1623 |
|
1624 | profile: HeapProfiler.SamplingHeapProfile;
|
1625 | }
|
1626 |
|
1627 | export interface AddHeapSnapshotChunkEventDataType {
|
1628 | chunk: string;
|
1629 | }
|
1630 |
|
1631 | export interface ReportHeapSnapshotProgressEventDataType {
|
1632 | done: number;
|
1633 | total: number;
|
1634 | finished?: boolean;
|
1635 | }
|
1636 |
|
1637 | export interface LastSeenObjectIdEventDataType {
|
1638 | lastSeenObjectId: number;
|
1639 | timestamp: number;
|
1640 | }
|
1641 |
|
1642 | export interface HeapStatsUpdateEventDataType {
|
1643 | |
1644 |
|
1645 |
|
1646 | statsUpdate: number[];
|
1647 | }
|
1648 | }
|
1649 |
|
1650 | |
1651 |
|
1652 |
|
1653 | export class Session extends EventEmitter {
|
1654 | |
1655 |
|
1656 |
|
1657 | constructor();
|
1658 |
|
1659 | /**
|
1660 | * Connects a session to the inspector back-end. An exception will be thrown if there is already a connected session established either through the API or by a front-end connected to the Inspector WebSocket port.
|
1661 | */
|
1662 | connect(): void;
|
1663 |
|
1664 | /**
|
1665 | * Immediately close the session. All pending message callbacks will be called with an error. session.connect() will need to be called to be able to send messages again. Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
|
1666 | */
|
1667 | disconnect(): void;
|
1668 |
|
1669 | /**
|
1670 | * Posts a message to the inspector back-end. callback will be notified when a response is received. callback is a function that accepts two optional arguments - error and message-specific result.
|
1671 | */
|
1672 | post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void;
|
1673 | post(method: string, callback?: (err: Error | null, params?: {}) => void): void;
|
1674 |
|
1675 | /**
|
1676 | * Returns supported domains.
|
1677 | */
|
1678 | post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
|
1679 | /**
|
1680 | * Evaluates expression on global object.
|
1681 | */
|
1682 | post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
|
1683 | post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
|
1684 |
|
1685 | /**
|
1686 | * Add handler to promise with given promise object id.
|
1687 | */
|
1688 | post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
|
1689 | post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
|
1690 |
|
1691 | /**
|
1692 | * Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
|
1693 | */
|
1694 | post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
|
1695 | post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
|
1696 |
|
1697 | /**
|
1698 | * Returns properties of a given object. Object group of the result is inherited from the target object.
|
1699 | */
|
1700 | post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
|
1701 | post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
|
1702 |
|
1703 | /**
|
1704 | * Releases remote object with given id.
|
1705 | */
|
1706 | post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
|
1707 | post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void;
|
1708 |
|
1709 | /**
|
1710 | * Releases all remote objects that belong to a given group.
|
1711 | */
|
1712 | post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
|
1713 | post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void;
|
1714 |
|
1715 | /**
|
1716 | * Tells inspected instance to run if it was waiting for debugger to attach.
|
1717 | */
|
1718 | post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void;
|
1719 |
|
1720 | /**
|
1721 | * Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
|
1722 | */
|
1723 | post(method: "Runtime.enable", callback?: (err: Error | null) => void): void;
|
1724 |
|
1725 | /**
|
1726 | * Disables reporting of execution contexts creation.
|
1727 | */
|
1728 | post(method: "Runtime.disable", callback?: (err: Error | null) => void): void;
|
1729 |
|
1730 | /**
|
1731 | * Discards collected exceptions and console API calls.
|
1732 | */
|
1733 | post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void;
|
1734 |
|
1735 | /**
|
1736 | * @experimental
|
1737 | */
|
1738 | post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
|
1739 | post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void;
|
1740 |
|
1741 | /**
|
1742 | * Compiles expression.
|
1743 | */
|
1744 | post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
|
1745 | post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
|
1746 |
|
1747 | /**
|
1748 | * Runs script with given id in a given context.
|
1749 | */
|
1750 | post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
|
1751 | post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
|
1752 | /**
|
1753 | * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
|
1754 | */
|
1755 | post(method: "Debugger.enable", callback?: (err: Error | null) => void): void;
|
1756 |
|
1757 | /**
|
1758 | * Disables debugger for given page.
|
1759 | */
|
1760 | post(method: "Debugger.disable", callback?: (err: Error | null) => void): void;
|
1761 |
|
1762 | /**
|
1763 | * Activates / deactivates all breakpoints on the page.
|
1764 | */
|
1765 | post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void;
|
1766 | post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void;
|
1767 |
|
1768 | /**
|
1769 | * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
|
1770 | */
|
1771 | post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void;
|
1772 | post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void;
|
1773 |
|
1774 | /**
|
1775 | * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads.
|
1776 | */
|
1777 | post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
|
1778 | post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
|
1779 |
|
1780 | /**
|
1781 | * Sets JavaScript breakpoint at a given location.
|
1782 | */
|
1783 | post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
|
1784 | post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
|
1785 |
|
1786 | /**
|
1787 | * Removes JavaScript breakpoint.
|
1788 | */
|
1789 | post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
|
1790 | post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void;
|
1791 |
|
1792 | /**
|
1793 | * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
|
1794 | * @experimental
|
1795 | */
|
1796 | post(method: "Debugger.getPossibleBreakpoints", params?: Debugger.GetPossibleBreakpointsParameterType, callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
|
1797 | post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
|
1798 |
|
1799 | /**
|
1800 | * Continues execution until specific location is reached.
|
1801 | */
|
1802 | post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
|
1803 | post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void;
|
1804 |
|
1805 | /**
|
1806 | * Steps over the statement.
|
1807 | */
|
1808 | post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void;
|
1809 |
|
1810 | /**
|
1811 | * Steps into the function call.
|
1812 | */
|
1813 | post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void;
|
1814 |
|
1815 | /**
|
1816 | * Steps out of the function call.
|
1817 | */
|
1818 | post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void;
|
1819 |
|
1820 | /**
|
1821 | * Stops on the next JavaScript statement.
|
1822 | */
|
1823 | post(method: "Debugger.pause", callback?: (err: Error | null) => void): void;
|
1824 |
|
1825 | /**
|
1826 | * Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
|
1827 | * @experimental
|
1828 | */
|
1829 | post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void;
|
1830 |
|
1831 | /**
|
1832 | * Resumes JavaScript execution.
|
1833 | */
|
1834 | post(method: "Debugger.resume", callback?: (err: Error | null) => void): void;
|
1835 |
|
1836 | /**
|
1837 | * Searches for given string in script content.
|
1838 | * @experimental
|
1839 | */
|
1840 | post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
|
1841 | post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
|
1842 |
|
1843 | /**
|
1844 | * Edits JavaScript source live.
|
1845 | */
|
1846 | post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
|
1847 | post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
|
1848 |
|
1849 | /**
|
1850 | * Restarts particular call frame from the beginning.
|
1851 | */
|
1852 | post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
|
1853 | post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
|
1854 |
|
1855 | /**
|
1856 | * Returns source for the script with given id.
|
1857 | */
|
1858 | post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
|
1859 | post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
|
1860 |
|
1861 | /**
|
1862 | * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>.
|
1863 | */
|
1864 | post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
|
1865 | post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void;
|
1866 |
|
1867 | /**
|
1868 | * Evaluates expression on a given call frame.
|
1869 | */
|
1870 | post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
|
1871 | post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
|
1872 |
|
1873 | /**
|
1874 | * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
|
1875 | */
|
1876 | post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
|
1877 | post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void;
|
1878 |
|
1879 | /**
|
1880 | * Enables or disables async call stacks tracking.
|
1881 | */
|
1882 | post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
|
1883 | post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void;
|
1884 |
|
1885 | /**
|
1886 | * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
|
1887 | * @experimental
|
1888 | */
|
1889 | post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
|
1890 | post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void;
|
1891 |
|
1892 | /**
|
1893 | * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
|
1894 | * @experimental
|
1895 | */
|
1896 | post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
|
1897 | post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void;
|
1898 | /**
|
1899 | * Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.
|
1900 | */
|
1901 | post(method: "Console.enable", callback?: (err: Error | null) => void): void;
|
1902 |
|
1903 | /**
|
1904 | * Disables console domain, prevents further console messages from being reported to the client.
|
1905 | */
|
1906 | post(method: "Console.disable", callback?: (err: Error | null) => void): void;
|
1907 |
|
1908 | /**
|
1909 | * Does nothing.
|
1910 | */
|
1911 | post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void;
|
1912 | post(method: "Profiler.enable", callback?: (err: Error | null) => void): void;
|
1913 |
|
1914 | post(method: "Profiler.disable", callback?: (err: Error | null) => void): void;
|
1915 |
|
1916 | /**
|
1917 | * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
|
1918 | */
|
1919 | post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
|
1920 | post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void;
|
1921 |
|
1922 | post(method: "Profiler.start", callback?: (err: Error | null) => void): void;
|
1923 |
|
1924 | post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
|
1925 |
|
1926 | /**
|
1927 | * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
|
1928 | * @experimental
|
1929 | */
|
1930 | post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
|
1931 | post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void;
|
1932 |
|
1933 | /**
|
1934 | * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
|
1935 | * @experimental
|
1936 | */
|
1937 | post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void;
|
1938 |
|
1939 | /**
|
1940 | * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
|
1941 | * @experimental
|
1942 | */
|
1943 | post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
|
1944 |
|
1945 | /**
|
1946 | * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
|
1947 | * @experimental
|
1948 | */
|
1949 | post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
|
1950 | post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void;
|
1951 |
|
1952 | post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void;
|
1953 |
|
1954 | post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
|
1955 | post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void;
|
1956 |
|
1957 | post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
|
1958 | post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void;
|
1959 |
|
1960 | post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
|
1961 | post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void;
|
1962 |
|
1963 | post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void;
|
1964 |
|
1965 | post(method: "HeapProfiler.getObjectByHeapObjectId", params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
|
1966 | post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
|
1967 |
|
1968 | /**
|
1969 | * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
|
1970 | */
|
1971 | post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
|
1972 | post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void;
|
1973 |
|
1974 | post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
|
1975 | post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
|
1976 |
|
1977 | post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
|
1978 | post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void;
|
1979 |
|
1980 | post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
|
1981 |
|
1982 | // Events
|
1983 |
|
1984 | addListener(event: string, listener: (...args: any[]) => void): this;
|
1985 |
|
1986 | /**
|
1987 | * Emitted when any notification from the V8 Inspector is received.
|
1988 | */
|
1989 | addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
|
1990 |
|
1991 | /**
|
1992 | * Issued when new execution context is created.
|
1993 | */
|
1994 | addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
1995 |
|
1996 | /**
|
1997 | * Issued when execution context is destroyed.
|
1998 | */
|
1999 | addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
2000 |
|
2001 | /**
|
2002 | * Issued when all executionContexts were cleared in browser
|
2003 | */
|
2004 | addListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
|
2005 |
|
2006 | /**
|
2007 | * Issued when exception was thrown and unhandled.
|
2008 | */
|
2009 | addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
2010 |
|
2011 | /**
|
2012 | * Issued when unhandled exception was revoked.
|
2013 | */
|
2014 | addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
2015 |
|
2016 | /**
|
2017 | * Issued when console API was called.
|
2018 | */
|
2019 | addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
2020 |
|
2021 | /**
|
2022 | * Issued when object should be inspected (for example, as a result of inspect() command line API call).
|
2023 | */
|
2024 | addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
2025 |
|
2026 | /**
|
2027 | * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
|
2028 | */
|
2029 | addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
2030 |
|
2031 | /**
|
2032 | * Fired when virtual machine fails to parse the script.
|
2033 | */
|
2034 | addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
2035 |
|
2036 | /**
|
2037 | * Fired when breakpoint is resolved to an actual script and location.
|
2038 | */
|
2039 | addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
2040 |
|
2041 | /**
|
2042 | * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
2043 | */
|
2044 | addListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
2045 |
|
2046 | /**
|
2047 | * Fired when the virtual machine resumed execution.
|
2048 | */
|
2049 | addListener(event: "Debugger.resumed", listener: () => void): this;
|
2050 |
|
2051 | /**
|
2052 | * Issued when new console message is added.
|
2053 | */
|
2054 | addListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
2055 |
|
2056 | /**
|
2057 | * Sent when new profile recording is started using console.profile() call.
|
2058 | */
|
2059 | addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
2060 |
|
2061 | addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
2062 | addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
2063 | addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
|
2064 | addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
2065 |
|
2066 | /**
|
2067 | * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
|
2068 | */
|
2069 | addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
2070 |
|
2071 | /**
|
2072 | * If heap objects tracking has been started then backend may send update for one or more fragments
|
2073 | */
|
2074 | addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
2075 |
|
2076 | emit(event: string | symbol, ...args: any[]): boolean;
|
2077 | emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean;
|
2078 | emit(event: "Runtime.executionContextCreated", message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
|
2079 | emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
|
2080 | emit(event: "Runtime.executionContextsCleared"): boolean;
|
2081 | emit(event: "Runtime.exceptionThrown", message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
|
2082 | emit(event: "Runtime.exceptionRevoked", message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
|
2083 | emit(event: "Runtime.consoleAPICalled", message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
|
2084 | emit(event: "Runtime.inspectRequested", message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
|
2085 | emit(event: "Debugger.scriptParsed", message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
|
2086 | emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
|
2087 | emit(event: "Debugger.breakpointResolved", message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
|
2088 | emit(event: "Debugger.paused", message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
|
2089 | emit(event: "Debugger.resumed"): boolean;
|
2090 | emit(event: "Console.messageAdded", message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
|
2091 | emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
|
2092 | emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
|
2093 | emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
|
2094 | emit(event: "HeapProfiler.resetProfiles"): boolean;
|
2095 | emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
|
2096 | emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
|
2097 | emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
|
2098 |
|
2099 | on(event: string, listener: (...args: any[]) => void): this;
|
2100 |
|
2101 | /**
|
2102 | * Emitted when any notification from the V8 Inspector is received.
|
2103 | */
|
2104 | on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
|
2105 |
|
2106 | /**
|
2107 | * Issued when new execution context is created.
|
2108 | */
|
2109 | on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
2110 |
|
2111 | /**
|
2112 | * Issued when execution context is destroyed.
|
2113 | */
|
2114 | on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
2115 |
|
2116 | /**
|
2117 | * Issued when all executionContexts were cleared in browser
|
2118 | */
|
2119 | on(event: "Runtime.executionContextsCleared", listener: () => void): this;
|
2120 |
|
2121 | /**
|
2122 | * Issued when exception was thrown and unhandled.
|
2123 | */
|
2124 | on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
2125 |
|
2126 | /**
|
2127 | * Issued when unhandled exception was revoked.
|
2128 | */
|
2129 | on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
2130 |
|
2131 | /**
|
2132 | * Issued when console API was called.
|
2133 | */
|
2134 | on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
2135 |
|
2136 | /**
|
2137 | * Issued when object should be inspected (for example, as a result of inspect() command line API call).
|
2138 | */
|
2139 | on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
2140 |
|
2141 | /**
|
2142 | * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
|
2143 | */
|
2144 | on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
2145 |
|
2146 | /**
|
2147 | * Fired when virtual machine fails to parse the script.
|
2148 | */
|
2149 | on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
2150 |
|
2151 | /**
|
2152 | * Fired when breakpoint is resolved to an actual script and location.
|
2153 | */
|
2154 | on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
2155 |
|
2156 | /**
|
2157 | * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
2158 | */
|
2159 | on(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
2160 |
|
2161 | /**
|
2162 | * Fired when the virtual machine resumed execution.
|
2163 | */
|
2164 | on(event: "Debugger.resumed", listener: () => void): this;
|
2165 |
|
2166 | /**
|
2167 | * Issued when new console message is added.
|
2168 | */
|
2169 | on(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
2170 |
|
2171 | /**
|
2172 | * Sent when new profile recording is started using console.profile() call.
|
2173 | */
|
2174 | on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
2175 |
|
2176 | on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
2177 | on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
2178 | on(event: "HeapProfiler.resetProfiles", listener: () => void): this;
|
2179 | on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
2180 |
|
2181 | /**
|
2182 | * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
|
2183 | */
|
2184 | on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
2185 |
|
2186 | /**
|
2187 | * If heap objects tracking has been started then backend may send update for one or more fragments
|
2188 | */
|
2189 | on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
2190 |
|
2191 | once(event: string, listener: (...args: any[]) => void): this;
|
2192 |
|
2193 | /**
|
2194 | * Emitted when any notification from the V8 Inspector is received.
|
2195 | */
|
2196 | once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
|
2197 |
|
2198 | /**
|
2199 | * Issued when new execution context is created.
|
2200 | */
|
2201 | once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
2202 |
|
2203 | /**
|
2204 | * Issued when execution context is destroyed.
|
2205 | */
|
2206 | once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
2207 |
|
2208 | /**
|
2209 | * Issued when all executionContexts were cleared in browser
|
2210 | */
|
2211 | once(event: "Runtime.executionContextsCleared", listener: () => void): this;
|
2212 |
|
2213 | /**
|
2214 | * Issued when exception was thrown and unhandled.
|
2215 | */
|
2216 | once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
2217 |
|
2218 | /**
|
2219 | * Issued when unhandled exception was revoked.
|
2220 | */
|
2221 | once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
2222 |
|
2223 | /**
|
2224 | * Issued when console API was called.
|
2225 | */
|
2226 | once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
2227 |
|
2228 | /**
|
2229 | * Issued when object should be inspected (for example, as a result of inspect() command line API call).
|
2230 | */
|
2231 | once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
2232 |
|
2233 | /**
|
2234 | * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
|
2235 | */
|
2236 | once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
2237 |
|
2238 | /**
|
2239 | * Fired when virtual machine fails to parse the script.
|
2240 | */
|
2241 | once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
2242 |
|
2243 | /**
|
2244 | * Fired when breakpoint is resolved to an actual script and location.
|
2245 | */
|
2246 | once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
2247 |
|
2248 | /**
|
2249 | * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
2250 | */
|
2251 | once(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
2252 |
|
2253 | /**
|
2254 | * Fired when the virtual machine resumed execution.
|
2255 | */
|
2256 | once(event: "Debugger.resumed", listener: () => void): this;
|
2257 |
|
2258 | /**
|
2259 | * Issued when new console message is added.
|
2260 | */
|
2261 | once(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
2262 |
|
2263 | /**
|
2264 | * Sent when new profile recording is started using console.profile() call.
|
2265 | */
|
2266 | once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
2267 |
|
2268 | once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
2269 | once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
2270 | once(event: "HeapProfiler.resetProfiles", listener: () => void): this;
|
2271 | once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
2272 |
|
2273 | /**
|
2274 | * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
|
2275 | */
|
2276 | once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
2277 |
|
2278 | /**
|
2279 | * If heap objects tracking has been started then backend may send update for one or more fragments
|
2280 | */
|
2281 | once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
2282 |
|
2283 | prependListener(event: string, listener: (...args: any[]) => void): this;
|
2284 |
|
2285 | /**
|
2286 | * Emitted when any notification from the V8 Inspector is received.
|
2287 | */
|
2288 | prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
|
2289 |
|
2290 | /**
|
2291 | * Issued when new execution context is created.
|
2292 | */
|
2293 | prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
2294 |
|
2295 | /**
|
2296 | * Issued when execution context is destroyed.
|
2297 | */
|
2298 | prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
2299 |
|
2300 | /**
|
2301 | * Issued when all executionContexts were cleared in browser
|
2302 | */
|
2303 | prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
|
2304 |
|
2305 | /**
|
2306 | * Issued when exception was thrown and unhandled.
|
2307 | */
|
2308 | prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
2309 |
|
2310 | /**
|
2311 | * Issued when unhandled exception was revoked.
|
2312 | */
|
2313 | prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
2314 |
|
2315 | /**
|
2316 | * Issued when console API was called.
|
2317 | */
|
2318 | prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
2319 |
|
2320 | /**
|
2321 | * Issued when object should be inspected (for example, as a result of inspect() command line API call).
|
2322 | */
|
2323 | prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
2324 |
|
2325 | /**
|
2326 | * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
|
2327 | */
|
2328 | prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
2329 |
|
2330 | /**
|
2331 | * Fired when virtual machine fails to parse the script.
|
2332 | */
|
2333 | prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
2334 |
|
2335 | /**
|
2336 | * Fired when breakpoint is resolved to an actual script and location.
|
2337 | */
|
2338 | prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
2339 |
|
2340 | /**
|
2341 | * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
2342 | */
|
2343 | prependListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
2344 |
|
2345 | /**
|
2346 | * Fired when the virtual machine resumed execution.
|
2347 | */
|
2348 | prependListener(event: "Debugger.resumed", listener: () => void): this;
|
2349 |
|
2350 | /**
|
2351 | * Issued when new console message is added.
|
2352 | */
|
2353 | prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
2354 |
|
2355 | /**
|
2356 | * Sent when new profile recording is started using console.profile() call.
|
2357 | */
|
2358 | prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
2359 |
|
2360 | prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
2361 | prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
2362 | prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
|
2363 | prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
2364 |
|
2365 | /**
|
2366 | * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
|
2367 | */
|
2368 | prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
2369 |
|
2370 | /**
|
2371 | * If heap objects tracking has been started then backend may send update for one or more fragments
|
2372 | */
|
2373 | prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
2374 |
|
2375 | prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
2376 |
|
2377 | /**
|
2378 | * Emitted when any notification from the V8 Inspector is received.
|
2379 | */
|
2380 | prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
|
2381 |
|
2382 | /**
|
2383 | * Issued when new execution context is created.
|
2384 | */
|
2385 | prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
2386 |
|
2387 | /**
|
2388 | * Issued when execution context is destroyed.
|
2389 | */
|
2390 | prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
2391 |
|
2392 | /**
|
2393 | * Issued when all executionContexts were cleared in browser
|
2394 | */
|
2395 | prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
|
2396 |
|
2397 | /**
|
2398 | * Issued when exception was thrown and unhandled.
|
2399 | */
|
2400 | prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
2401 |
|
2402 | /**
|
2403 | * Issued when unhandled exception was revoked.
|
2404 | */
|
2405 | prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
2406 |
|
2407 | /**
|
2408 | * Issued when console API was called.
|
2409 | */
|
2410 | prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
2411 |
|
2412 | /**
|
2413 | * Issued when object should be inspected (for example, as a result of inspect() command line API call).
|
2414 | */
|
2415 | prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
2416 |
|
2417 | /**
|
2418 | * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
|
2419 | */
|
2420 | prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
2421 |
|
2422 | /**
|
2423 | * Fired when virtual machine fails to parse the script.
|
2424 | */
|
2425 | prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
2426 |
|
2427 | /**
|
2428 | * Fired when breakpoint is resolved to an actual script and location.
|
2429 | */
|
2430 | prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
2431 |
|
2432 | /**
|
2433 | * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
2434 | */
|
2435 | prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
2436 |
|
2437 | /**
|
2438 | * Fired when the virtual machine resumed execution.
|
2439 | */
|
2440 | prependOnceListener(event: "Debugger.resumed", listener: () => void): this;
|
2441 |
|
2442 | /**
|
2443 | * Issued when new console message is added.
|
2444 | */
|
2445 | prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
2446 |
|
2447 | /**
|
2448 | * Sent when new profile recording is started using console.profile() call.
|
2449 | */
|
2450 | prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
2451 |
|
2452 | prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
2453 | prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
2454 | prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
|
2455 | prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
2456 |
|
2457 | /**
|
2458 | * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
|
2459 | */
|
2460 | prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
2461 |
|
2462 | /**
|
2463 | * If heap objects tracking has been started then backend may send update for one or more fragments
|
2464 | */
|
2465 | prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
2466 | }
|
2467 |
|
2468 | // Top Level API
|
2469 |
|
2470 | /**
|
2471 | * Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programatically after node has started.
|
2472 | * 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.
|
2473 | * @param port Port to listen on for inspector connections. Optional, defaults to what was specified on the CLI.
|
2474 | * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI.
|
2475 | * @param wait Block until a client has connected. Optional, defaults to false.
|
2476 | */
|
2477 | export function open(port?: number, host?: string, wait?: boolean): void;
|
2478 |
|
2479 | /**
|
2480 | * Deactivate the inspector. Blocks until there are no active connections.
|
2481 | */
|
2482 | export function close(): void;
|
2483 |
|
2484 | /**
|
2485 | * Return the URL of the active inspector, or undefined if there is none.
|
2486 | */
|
2487 | export function url(): string;
|
2488 | }
|