UNPKG

125 kBTypeScriptView Raw
1// tslint:disable-next-line:dt-header
2// Type definitions for inspector
3
4// These definitions are auto-generated.
5// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330
6// for more information.
7
8// tslint:disable:max-line-length
9
10/**
11 * The `inspector` module provides an API for interacting with the V8 inspector.
12 *
13 * It can be accessed using:
14 *
15 * ```js
16 * const inspector = require('inspector');
17 * ```
18 * @experimental
19 * @see [source](https://github.com/nodejs/node/blob/v16.4.2/lib/inspector.js)
20 */
21declare module 'inspector' {
22 import EventEmitter = require('node:events');
23 interface InspectorNotification<T> {
24 method: string;
25 params: T;
26 }
27 namespace Schema {
28 /**
29 * Description of the protocol domain.
30 */
31 interface Domain {
32 /**
33 * Domain name.
34 */
35 name: string;
36 /**
37 * Domain version.
38 */
39 version: string;
40 }
41 interface GetDomainsReturnType {
42 /**
43 * List of supported domains.
44 */
45 domains: Domain[];
46 }
47 }
48 namespace Runtime {
49 /**
50 * Unique script identifier.
51 */
52 type ScriptId = string;
53 /**
54 * Unique object identifier.
55 */
56 type RemoteObjectId = string;
57 /**
58 * Primitive value which cannot be JSON-stringified.
59 */
60 type UnserializableValue = string;
61 /**
62 * Mirror object referencing original JavaScript object.
63 */
64 interface RemoteObject {
65 /**
66 * Object type.
67 */
68 type: string;
69 /**
70 * Object subtype hint. Specified for <code>object</code> type values only.
71 */
72 subtype?: string | undefined;
73 /**
74 * Object class (constructor) name. Specified for <code>object</code> type values only.
75 */
76 className?: string | undefined;
77 /**
78 * Remote object value in case of primitive values or JSON values (if it was requested).
79 */
80 value?: any;
81 /**
82 * Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property.
83 */
84 unserializableValue?: UnserializableValue | undefined;
85 /**
86 * String representation of the object.
87 */
88 description?: string | undefined;
89 /**
90 * Unique object identifier (for non-primitive values).
91 */
92 objectId?: RemoteObjectId | undefined;
93 /**
94 * Preview containing abbreviated property values. Specified for <code>object</code> type values only.
95 * @experimental
96 */
97 preview?: ObjectPreview | undefined;
98 /**
99 * @experimental
100 */
101 customPreview?: CustomPreview | undefined;
102 }
103 /**
104 * @experimental
105 */
106 interface CustomPreview {
107 header: string;
108 hasBody: boolean;
109 formatterObjectId: RemoteObjectId;
110 bindRemoteObjectFunctionId: RemoteObjectId;
111 configObjectId?: RemoteObjectId | undefined;
112 }
113 /**
114 * Object containing abbreviated remote object value.
115 * @experimental
116 */
117 interface ObjectPreview {
118 /**
119 * Object type.
120 */
121 type: string;
122 /**
123 * Object subtype hint. Specified for <code>object</code> type values only.
124 */
125 subtype?: string | undefined;
126 /**
127 * String representation of the object.
128 */
129 description?: string | undefined;
130 /**
131 * True iff some of the properties or entries of the original object did not fit.
132 */
133 overflow: boolean;
134 /**
135 * List of the properties.
136 */
137 properties: PropertyPreview[];
138 /**
139 * List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only.
140 */
141 entries?: EntryPreview[] | undefined;
142 }
143 /**
144 * @experimental
145 */
146 interface PropertyPreview {
147 /**
148 * Property name.
149 */
150 name: string;
151 /**
152 * Object type. Accessor means that the property itself is an accessor property.
153 */
154 type: string;
155 /**
156 * User-friendly property value string.
157 */
158 value?: string | undefined;
159 /**
160 * Nested value preview.
161 */
162 valuePreview?: ObjectPreview | undefined;
163 /**
164 * Object subtype hint. Specified for <code>object</code> type values only.
165 */
166 subtype?: string | undefined;
167 }
168 /**
169 * @experimental
170 */
171 interface EntryPreview {
172 /**
173 * Preview of the key. Specified for map-like collection entries.
174 */
175 key?: ObjectPreview | undefined;
176 /**
177 * Preview of the value.
178 */
179 value: ObjectPreview;
180 }
181 /**
182 * Object property descriptor.
183 */
184 interface PropertyDescriptor {
185 /**
186 * Property name or symbol description.
187 */
188 name: string;
189 /**
190 * The value associated with the property.
191 */
192 value?: RemoteObject | undefined;
193 /**
194 * True if the value associated with the property may be changed (data descriptors only).
195 */
196 writable?: boolean | undefined;
197 /**
198 * A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only).
199 */
200 get?: RemoteObject | undefined;
201 /**
202 * A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only).
203 */
204 set?: RemoteObject | undefined;
205 /**
206 * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
207 */
208 configurable: boolean;
209 /**
210 * True if this property shows up during enumeration of the properties on the corresponding object.
211 */
212 enumerable: boolean;
213 /**
214 * True if the result was thrown during the evaluation.
215 */
216 wasThrown?: boolean | undefined;
217 /**
218 * True if the property is owned for the object.
219 */
220 isOwn?: boolean | undefined;
221 /**
222 * Property symbol object, if the property is of the <code>symbol</code> type.
223 */
224 symbol?: RemoteObject | undefined;
225 }
226 /**
227 * Object internal property descriptor. This property isn't normally visible in JavaScript code.
228 */
229 interface InternalPropertyDescriptor {
230 /**
231 * Conventional property name.
232 */
233 name: string;
234 /**
235 * The value associated with the property.
236 */
237 value?: RemoteObject | undefined;
238 }
239 /**
240 * Represents function call argument. Either remote object id <code>objectId</code>, primitive <code>value</code>, unserializable primitive value or neither of (for undefined) them should be specified.
241 */
242 interface CallArgument {
243 /**
244 * Primitive value or serializable javascript object.
245 */
246 value?: any;
247 /**
248 * Primitive value which can not be JSON-stringified.
249 */
250 unserializableValue?: UnserializableValue | undefined;
251 /**
252 * Remote object handle.
253 */
254 objectId?: RemoteObjectId | undefined;
255 }
256 /**
257 * Id of an execution context.
258 */
259 type ExecutionContextId = number;
260 /**
261 * Description of an isolated world.
262 */
263 interface ExecutionContextDescription {
264 /**
265 * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
266 */
267 id: ExecutionContextId;
268 /**
269 * Execution context origin.
270 */
271 origin: string;
272 /**
273 * Human readable name describing given context.
274 */
275 name: string;
276 /**
277 * Embedder-specific auxiliary data.
278 */
279 auxData?: {} | undefined;
280 }
281 /**
282 * Detailed information about exception (or error) that was thrown during script compilation or execution.
283 */
284 interface ExceptionDetails {
285 /**
286 * Exception id.
287 */
288 exceptionId: number;
289 /**
290 * Exception text, which should be used together with exception object when available.
291 */
292 text: string;
293 /**
294 * Line number of the exception location (0-based).
295 */
296 lineNumber: number;
297 /**
298 * Column number of the exception location (0-based).
299 */
300 columnNumber: number;
301 /**
302 * Script ID of the exception location.
303 */
304 scriptId?: ScriptId | undefined;
305 /**
306 * URL of the exception location, to be used when the script was not reported.
307 */
308 url?: string | undefined;
309 /**
310 * JavaScript stack trace if available.
311 */
312 stackTrace?: StackTrace | undefined;
313 /**
314 * Exception object if available.
315 */
316 exception?: RemoteObject | undefined;
317 /**
318 * Identifier of the context where exception happened.
319 */
320 executionContextId?: ExecutionContextId | undefined;
321 }
322 /**
323 * Number of milliseconds since epoch.
324 */
325 type Timestamp = number;
326 /**
327 * Stack entry for runtime errors and assertions.
328 */
329 interface CallFrame {
330 /**
331 * JavaScript function name.
332 */
333 functionName: string;
334 /**
335 * JavaScript script id.
336 */
337 scriptId: ScriptId;
338 /**
339 * JavaScript script name or url.
340 */
341 url: string;
342 /**
343 * JavaScript script line number (0-based).
344 */
345 lineNumber: number;
346 /**
347 * JavaScript script column number (0-based).
348 */
349 columnNumber: number;
350 }
351 /**
352 * Call frames for assertions or error messages.
353 */
354 interface StackTrace {
355 /**
356 * String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
357 */
358 description?: string | undefined;
359 /**
360 * JavaScript function name.
361 */
362 callFrames: CallFrame[];
363 /**
364 * Asynchronous JavaScript stack trace that preceded this stack, if available.
365 */
366 parent?: StackTrace | undefined;
367 /**
368 * Asynchronous JavaScript stack trace that preceded this stack, if available.
369 * @experimental
370 */
371 parentId?: StackTraceId | undefined;
372 }
373 /**
374 * Unique identifier of current debugger.
375 * @experimental
376 */
377 type UniqueDebuggerId = string;
378 /**
379 * If <code>debuggerId</code> is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See <code>Runtime.StackTrace</code> and <code>Debugger.paused</code> for usages.
380 * @experimental
381 */
382 interface StackTraceId {
383 id: string;
384 debuggerId?: UniqueDebuggerId | undefined;
385 }
386 interface EvaluateParameterType {
387 /**
388 * Expression to evaluate.
389 */
390 expression: string;
391 /**
392 * Symbolic group name that can be used to release multiple objects.
393 */
394 objectGroup?: string | undefined;
395 /**
396 * Determines whether Command Line API should be available during the evaluation.
397 */
398 includeCommandLineAPI?: boolean | undefined;
399 /**
400 * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
401 */
402 silent?: boolean | undefined;
403 /**
404 * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
405 */
406 contextId?: ExecutionContextId | undefined;
407 /**
408 * Whether the result is expected to be a JSON object that should be sent by value.
409 */
410 returnByValue?: boolean | undefined;
411 /**
412 * Whether preview should be generated for the result.
413 * @experimental
414 */
415 generatePreview?: boolean | undefined;
416 /**
417 * Whether execution should be treated as initiated by user in the UI.
418 */
419 userGesture?: boolean | undefined;
420 /**
421 * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
422 */
423 awaitPromise?: boolean | undefined;
424 }
425 interface AwaitPromiseParameterType {
426 /**
427 * Identifier of the promise.
428 */
429 promiseObjectId: RemoteObjectId;
430 /**
431 * Whether the result is expected to be a JSON object that should be sent by value.
432 */
433 returnByValue?: boolean | undefined;
434 /**
435 * Whether preview should be generated for the result.
436 */
437 generatePreview?: boolean | undefined;
438 }
439 interface CallFunctionOnParameterType {
440 /**
441 * Declaration of the function to call.
442 */
443 functionDeclaration: string;
444 /**
445 * Identifier of the object to call function on. Either objectId or executionContextId should be specified.
446 */
447 objectId?: RemoteObjectId | undefined;
448 /**
449 * Call arguments. All call arguments must belong to the same JavaScript world as the target object.
450 */
451 arguments?: CallArgument[] | undefined;
452 /**
453 * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
454 */
455 silent?: boolean | undefined;
456 /**
457 * Whether the result is expected to be a JSON object which should be sent by value.
458 */
459 returnByValue?: boolean | undefined;
460 /**
461 * Whether preview should be generated for the result.
462 * @experimental
463 */
464 generatePreview?: boolean | undefined;
465 /**
466 * Whether execution should be treated as initiated by user in the UI.
467 */
468 userGesture?: boolean | undefined;
469 /**
470 * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
471 */
472 awaitPromise?: boolean | undefined;
473 /**
474 * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
475 */
476 executionContextId?: ExecutionContextId | undefined;
477 /**
478 * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
479 */
480 objectGroup?: string | undefined;
481 }
482 interface GetPropertiesParameterType {
483 /**
484 * Identifier of the object to return properties for.
485 */
486 objectId: RemoteObjectId;
487 /**
488 * If true, returns properties belonging only to the element itself, not to its prototype chain.
489 */
490 ownProperties?: boolean | undefined;
491 /**
492 * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
493 * @experimental
494 */
495 accessorPropertiesOnly?: boolean | undefined;
496 /**
497 * Whether preview should be generated for the results.
498 * @experimental
499 */
500 generatePreview?: boolean | undefined;
501 }
502 interface ReleaseObjectParameterType {
503 /**
504 * Identifier of the object to release.
505 */
506 objectId: RemoteObjectId;
507 }
508 interface ReleaseObjectGroupParameterType {
509 /**
510 * Symbolic object group name.
511 */
512 objectGroup: string;
513 }
514 interface SetCustomObjectFormatterEnabledParameterType {
515 enabled: boolean;
516 }
517 interface CompileScriptParameterType {
518 /**
519 * Expression to compile.
520 */
521 expression: string;
522 /**
523 * Source url to be set for the script.
524 */
525 sourceURL: string;
526 /**
527 * Specifies whether the compiled script should be persisted.
528 */
529 persistScript: boolean;
530 /**
531 * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
532 */
533 executionContextId?: ExecutionContextId | undefined;
534 }
535 interface RunScriptParameterType {
536 /**
537 * Id of the script to run.
538 */
539 scriptId: ScriptId;
540 /**
541 * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
542 */
543 executionContextId?: ExecutionContextId | undefined;
544 /**
545 * Symbolic group name that can be used to release multiple objects.
546 */
547 objectGroup?: string | undefined;
548 /**
549 * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
550 */
551 silent?: boolean | undefined;
552 /**
553 * Determines whether Command Line API should be available during the evaluation.
554 */
555 includeCommandLineAPI?: boolean | undefined;
556 /**
557 * Whether the result is expected to be a JSON object which should be sent by value.
558 */
559 returnByValue?: boolean | undefined;
560 /**
561 * Whether preview should be generated for the result.
562 */
563 generatePreview?: boolean | undefined;
564 /**
565 * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
566 */
567 awaitPromise?: boolean | undefined;
568 }
569 interface QueryObjectsParameterType {
570 /**
571 * Identifier of the prototype to return objects for.
572 */
573 prototypeObjectId: RemoteObjectId;
574 }
575 interface GlobalLexicalScopeNamesParameterType {
576 /**
577 * Specifies in which execution context to lookup global scope variables.
578 */
579 executionContextId?: ExecutionContextId | undefined;
580 }
581 interface EvaluateReturnType {
582 /**
583 * Evaluation result.
584 */
585 result: RemoteObject;
586 /**
587 * Exception details.
588 */
589 exceptionDetails?: ExceptionDetails | undefined;
590 }
591 interface AwaitPromiseReturnType {
592 /**
593 * Promise result. Will contain rejected value if promise was rejected.
594 */
595 result: RemoteObject;
596 /**
597 * Exception details if stack strace is available.
598 */
599 exceptionDetails?: ExceptionDetails | undefined;
600 }
601 interface CallFunctionOnReturnType {
602 /**
603 * Call result.
604 */
605 result: RemoteObject;
606 /**
607 * Exception details.
608 */
609 exceptionDetails?: ExceptionDetails | undefined;
610 }
611 interface GetPropertiesReturnType {
612 /**
613 * Object properties.
614 */
615 result: PropertyDescriptor[];
616 /**
617 * Internal object properties (only of the element itself).
618 */
619 internalProperties?: InternalPropertyDescriptor[] | undefined;
620 /**
621 * Exception details.
622 */
623 exceptionDetails?: ExceptionDetails | undefined;
624 }
625 interface CompileScriptReturnType {
626 /**
627 * Id of the script.
628 */
629 scriptId?: ScriptId | undefined;
630 /**
631 * Exception details.
632 */
633 exceptionDetails?: ExceptionDetails | undefined;
634 }
635 interface RunScriptReturnType {
636 /**
637 * Run result.
638 */
639 result: RemoteObject;
640 /**
641 * Exception details.
642 */
643 exceptionDetails?: ExceptionDetails | undefined;
644 }
645 interface QueryObjectsReturnType {
646 /**
647 * Array with objects.
648 */
649 objects: RemoteObject;
650 }
651 interface GlobalLexicalScopeNamesReturnType {
652 names: string[];
653 }
654 interface ExecutionContextCreatedEventDataType {
655 /**
656 * A newly created execution context.
657 */
658 context: ExecutionContextDescription;
659 }
660 interface ExecutionContextDestroyedEventDataType {
661 /**
662 * Id of the destroyed context
663 */
664 executionContextId: ExecutionContextId;
665 }
666 interface ExceptionThrownEventDataType {
667 /**
668 * Timestamp of the exception.
669 */
670 timestamp: Timestamp;
671 exceptionDetails: ExceptionDetails;
672 }
673 interface ExceptionRevokedEventDataType {
674 /**
675 * Reason describing why exception was revoked.
676 */
677 reason: string;
678 /**
679 * The id of revoked exception, as reported in <code>exceptionThrown</code>.
680 */
681 exceptionId: number;
682 }
683 interface ConsoleAPICalledEventDataType {
684 /**
685 * Type of the call.
686 */
687 type: string;
688 /**
689 * Call arguments.
690 */
691 args: RemoteObject[];
692 /**
693 * Identifier of the context where the call was made.
694 */
695 executionContextId: ExecutionContextId;
696 /**
697 * Call timestamp.
698 */
699 timestamp: Timestamp;
700 /**
701 * Stack trace captured when the call was made.
702 */
703 stackTrace?: StackTrace | undefined;
704 /**
705 * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
706 * @experimental
707 */
708 context?: string | undefined;
709 }
710 interface InspectRequestedEventDataType {
711 object: RemoteObject;
712 hints: {};
713 }
714 }
715 namespace Debugger {
716 /**
717 * Breakpoint identifier.
718 */
719 type BreakpointId = string;
720 /**
721 * Call frame identifier.
722 */
723 type CallFrameId = string;
724 /**
725 * Location in the source code.
726 */
727 interface Location {
728 /**
729 * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
730 */
731 scriptId: Runtime.ScriptId;
732 /**
733 * Line number in the script (0-based).
734 */
735 lineNumber: number;
736 /**
737 * Column number in the script (0-based).
738 */
739 columnNumber?: number | undefined;
740 }
741 /**
742 * Location in the source code.
743 * @experimental
744 */
745 interface ScriptPosition {
746 lineNumber: number;
747 columnNumber: number;
748 }
749 /**
750 * JavaScript call frame. Array of call frames form the call stack.
751 */
752 interface CallFrame {
753 /**
754 * Call frame identifier. This identifier is only valid while the virtual machine is paused.
755 */
756 callFrameId: CallFrameId;
757 /**
758 * Name of the JavaScript function called on this call frame.
759 */
760 functionName: string;
761 /**
762 * Location in the source code.
763 */
764 functionLocation?: Location | undefined;
765 /**
766 * Location in the source code.
767 */
768 location: Location;
769 /**
770 * JavaScript script name or url.
771 */
772 url: string;
773 /**
774 * Scope chain for this call frame.
775 */
776 scopeChain: Scope[];
777 /**
778 * <code>this</code> object for this call frame.
779 */
780 this: Runtime.RemoteObject;
781 /**
782 * The value being returned, if the function is at return point.
783 */
784 returnValue?: Runtime.RemoteObject | undefined;
785 }
786 /**
787 * Scope description.
788 */
789 interface Scope {
790 /**
791 * Scope type.
792 */
793 type: string;
794 /**
795 * Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
796 */
797 object: Runtime.RemoteObject;
798 name?: string | undefined;
799 /**
800 * Location in the source code where scope starts
801 */
802 startLocation?: Location | undefined;
803 /**
804 * Location in the source code where scope ends
805 */
806 endLocation?: Location | undefined;
807 }
808 /**
809 * Search match for resource.
810 */
811 interface SearchMatch {
812 /**
813 * Line number in resource content.
814 */
815 lineNumber: number;
816 /**
817 * Line with match content.
818 */
819 lineContent: string;
820 }
821 interface BreakLocation {
822 /**
823 * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
824 */
825 scriptId: Runtime.ScriptId;
826 /**
827 * Line number in the script (0-based).
828 */
829 lineNumber: number;
830 /**
831 * Column number in the script (0-based).
832 */
833 columnNumber?: number | undefined;
834 type?: string | undefined;
835 }
836 interface SetBreakpointsActiveParameterType {
837 /**
838 * New value for breakpoints active state.
839 */
840 active: boolean;
841 }
842 interface SetSkipAllPausesParameterType {
843 /**
844 * New value for skip pauses state.
845 */
846 skip: boolean;
847 }
848 interface SetBreakpointByUrlParameterType {
849 /**
850 * Line number to set breakpoint at.
851 */
852 lineNumber: number;
853 /**
854 * URL of the resources to set breakpoint on.
855 */
856 url?: string | undefined;
857 /**
858 * Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified.
859 */
860 urlRegex?: string | undefined;
861 /**
862 * Script hash of the resources to set breakpoint on.
863 */
864 scriptHash?: string | undefined;
865 /**
866 * Offset in the line to set breakpoint at.
867 */
868 columnNumber?: number | undefined;
869 /**
870 * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
871 */
872 condition?: string | undefined;
873 }
874 interface SetBreakpointParameterType {
875 /**
876 * Location to set breakpoint in.
877 */
878 location: Location;
879 /**
880 * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
881 */
882 condition?: string | undefined;
883 }
884 interface RemoveBreakpointParameterType {
885 breakpointId: BreakpointId;
886 }
887 interface GetPossibleBreakpointsParameterType {
888 /**
889 * Start of range to search possible breakpoint locations in.
890 */
891 start: Location;
892 /**
893 * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
894 */
895 end?: Location | undefined;
896 /**
897 * Only consider locations which are in the same (non-nested) function as start.
898 */
899 restrictToFunction?: boolean | undefined;
900 }
901 interface ContinueToLocationParameterType {
902 /**
903 * Location to continue to.
904 */
905 location: Location;
906 targetCallFrames?: string | undefined;
907 }
908 interface PauseOnAsyncCallParameterType {
909 /**
910 * Debugger will pause when async call with given stack trace is started.
911 */
912 parentStackTraceId: Runtime.StackTraceId;
913 }
914 interface StepIntoParameterType {
915 /**
916 * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause.
917 * @experimental
918 */
919 breakOnAsyncCall?: boolean | undefined;
920 }
921 interface GetStackTraceParameterType {
922 stackTraceId: Runtime.StackTraceId;
923 }
924 interface SearchInContentParameterType {
925 /**
926 * Id of the script to search in.
927 */
928 scriptId: Runtime.ScriptId;
929 /**
930 * String to search for.
931 */
932 query: string;
933 /**
934 * If true, search is case sensitive.
935 */
936 caseSensitive?: boolean | undefined;
937 /**
938 * If true, treats string parameter as regex.
939 */
940 isRegex?: boolean | undefined;
941 }
942 interface SetScriptSourceParameterType {
943 /**
944 * Id of the script to edit.
945 */
946 scriptId: Runtime.ScriptId;
947 /**
948 * New content of the script.
949 */
950 scriptSource: string;
951 /**
952 * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
953 */
954 dryRun?: boolean | undefined;
955 }
956 interface RestartFrameParameterType {
957 /**
958 * Call frame identifier to evaluate on.
959 */
960 callFrameId: CallFrameId;
961 }
962 interface GetScriptSourceParameterType {
963 /**
964 * Id of the script to get source for.
965 */
966 scriptId: Runtime.ScriptId;
967 }
968 interface SetPauseOnExceptionsParameterType {
969 /**
970 * Pause on exceptions mode.
971 */
972 state: string;
973 }
974 interface EvaluateOnCallFrameParameterType {
975 /**
976 * Call frame identifier to evaluate on.
977 */
978 callFrameId: CallFrameId;
979 /**
980 * Expression to evaluate.
981 */
982 expression: string;
983 /**
984 * String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>).
985 */
986 objectGroup?: string | undefined;
987 /**
988 * Specifies whether command line API should be available to the evaluated expression, defaults to false.
989 */
990 includeCommandLineAPI?: boolean | undefined;
991 /**
992 * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
993 */
994 silent?: boolean | undefined;
995 /**
996 * Whether the result is expected to be a JSON object that should be sent by value.
997 */
998 returnByValue?: boolean | undefined;
999 /**
1000 * Whether preview should be generated for the result.
1001 * @experimental
1002 */
1003 generatePreview?: boolean | undefined;
1004 /**
1005 * Whether to throw an exception if side effect cannot be ruled out during evaluation.
1006 */
1007 throwOnSideEffect?: boolean | undefined;
1008 }
1009 interface SetVariableValueParameterType {
1010 /**
1011 * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
1012 */
1013 scopeNumber: number;
1014 /**
1015 * Variable name.
1016 */
1017 variableName: string;
1018 /**
1019 * New variable value.
1020 */
1021 newValue: Runtime.CallArgument;
1022 /**
1023 * Id of callframe that holds variable.
1024 */
1025 callFrameId: CallFrameId;
1026 }
1027 interface SetReturnValueParameterType {
1028 /**
1029 * New return value.
1030 */
1031 newValue: Runtime.CallArgument;
1032 }
1033 interface SetAsyncCallStackDepthParameterType {
1034 /**
1035 * Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default).
1036 */
1037 maxDepth: number;
1038 }
1039 interface SetBlackboxPatternsParameterType {
1040 /**
1041 * Array of regexps that will be used to check script url for blackbox state.
1042 */
1043 patterns: string[];
1044 }
1045 interface SetBlackboxedRangesParameterType {
1046 /**
1047 * Id of the script.
1048 */
1049 scriptId: Runtime.ScriptId;
1050 positions: ScriptPosition[];
1051 }
1052 interface EnableReturnType {
1053 /**
1054 * Unique identifier of the debugger.
1055 * @experimental
1056 */
1057 debuggerId: Runtime.UniqueDebuggerId;
1058 }
1059 interface SetBreakpointByUrlReturnType {
1060 /**
1061 * Id of the created breakpoint for further reference.
1062 */
1063 breakpointId: BreakpointId;
1064 /**
1065 * List of the locations this breakpoint resolved into upon addition.
1066 */
1067 locations: Location[];
1068 }
1069 interface SetBreakpointReturnType {
1070 /**
1071 * Id of the created breakpoint for further reference.
1072 */
1073 breakpointId: BreakpointId;
1074 /**
1075 * Location this breakpoint resolved into.
1076 */
1077 actualLocation: Location;
1078 }
1079 interface GetPossibleBreakpointsReturnType {
1080 /**
1081 * List of the possible breakpoint locations.
1082 */
1083 locations: BreakLocation[];
1084 }
1085 interface GetStackTraceReturnType {
1086 stackTrace: Runtime.StackTrace;
1087 }
1088 interface SearchInContentReturnType {
1089 /**
1090 * List of search matches.
1091 */
1092 result: SearchMatch[];
1093 }
1094 interface SetScriptSourceReturnType {
1095 /**
1096 * New stack trace in case editing has happened while VM was stopped.
1097 */
1098 callFrames?: CallFrame[] | undefined;
1099 /**
1100 * Whether current call stack was modified after applying the changes.
1101 */
1102 stackChanged?: boolean | undefined;
1103 /**
1104 * Async stack trace, if any.
1105 */
1106 asyncStackTrace?: Runtime.StackTrace | undefined;
1107 /**
1108 * Async stack trace, if any.
1109 * @experimental
1110 */
1111 asyncStackTraceId?: Runtime.StackTraceId | undefined;
1112 /**
1113 * Exception details if any.
1114 */
1115 exceptionDetails?: Runtime.ExceptionDetails | undefined;
1116 }
1117 interface RestartFrameReturnType {
1118 /**
1119 * New stack trace.
1120 */
1121 callFrames: CallFrame[];
1122 /**
1123 * Async stack trace, if any.
1124 */
1125 asyncStackTrace?: Runtime.StackTrace | undefined;
1126 /**
1127 * Async stack trace, if any.
1128 * @experimental
1129 */
1130 asyncStackTraceId?: Runtime.StackTraceId | undefined;
1131 }
1132 interface GetScriptSourceReturnType {
1133 /**
1134 * Script source.
1135 */
1136 scriptSource: string;
1137 }
1138 interface EvaluateOnCallFrameReturnType {
1139 /**
1140 * Object wrapper for the evaluation result.
1141 */
1142 result: Runtime.RemoteObject;
1143 /**
1144 * Exception details.
1145 */
1146 exceptionDetails?: Runtime.ExceptionDetails | undefined;
1147 }
1148 interface ScriptParsedEventDataType {
1149 /**
1150 * Identifier of the script parsed.
1151 */
1152 scriptId: Runtime.ScriptId;
1153 /**
1154 * URL or name of the script parsed (if any).
1155 */
1156 url: string;
1157 /**
1158 * Line offset of the script within the resource with given URL (for script tags).
1159 */
1160 startLine: number;
1161 /**
1162 * Column offset of the script within the resource with given URL.
1163 */
1164 startColumn: number;
1165 /**
1166 * Last line of the script.
1167 */
1168 endLine: number;
1169 /**
1170 * Length of the last line of the script.
1171 */
1172 endColumn: number;
1173 /**
1174 * Specifies script creation context.
1175 */
1176 executionContextId: Runtime.ExecutionContextId;
1177 /**
1178 * Content hash of the script.
1179 */
1180 hash: string;
1181 /**
1182 * Embedder-specific auxiliary data.
1183 */
1184 executionContextAuxData?: {} | undefined;
1185 /**
1186 * True, if this script is generated as a result of the live edit operation.
1187 * @experimental
1188 */
1189 isLiveEdit?: boolean | undefined;
1190 /**
1191 * URL of source map associated with script (if any).
1192 */
1193 sourceMapURL?: string | undefined;
1194 /**
1195 * True, if this script has sourceURL.
1196 */
1197 hasSourceURL?: boolean | undefined;
1198 /**
1199 * True, if this script is ES6 module.
1200 */
1201 isModule?: boolean | undefined;
1202 /**
1203 * This script length.
1204 */
1205 length?: number | undefined;
1206 /**
1207 * JavaScript top stack frame of where the script parsed event was triggered if available.
1208 * @experimental
1209 */
1210 stackTrace?: Runtime.StackTrace | undefined;
1211 }
1212 interface ScriptFailedToParseEventDataType {
1213 /**
1214 * Identifier of the script parsed.
1215 */
1216 scriptId: Runtime.ScriptId;
1217 /**
1218 * URL or name of the script parsed (if any).
1219 */
1220 url: string;
1221 /**
1222 * Line offset of the script within the resource with given URL (for script tags).
1223 */
1224 startLine: number;
1225 /**
1226 * Column offset of the script within the resource with given URL.
1227 */
1228 startColumn: number;
1229 /**
1230 * Last line of the script.
1231 */
1232 endLine: number;
1233 /**
1234 * Length of the last line of the script.
1235 */
1236 endColumn: number;
1237 /**
1238 * Specifies script creation context.
1239 */
1240 executionContextId: Runtime.ExecutionContextId;
1241 /**
1242 * Content hash of the script.
1243 */
1244 hash: string;
1245 /**
1246 * Embedder-specific auxiliary data.
1247 */
1248 executionContextAuxData?: {} | undefined;
1249 /**
1250 * URL of source map associated with script (if any).
1251 */
1252 sourceMapURL?: string | undefined;
1253 /**
1254 * True, if this script has sourceURL.
1255 */
1256 hasSourceURL?: boolean | undefined;
1257 /**
1258 * True, if this script is ES6 module.
1259 */
1260 isModule?: boolean | undefined;
1261 /**
1262 * This script length.
1263 */
1264 length?: number | undefined;
1265 /**
1266 * JavaScript top stack frame of where the script parsed event was triggered if available.
1267 * @experimental
1268 */
1269 stackTrace?: Runtime.StackTrace | undefined;
1270 }
1271 interface BreakpointResolvedEventDataType {
1272 /**
1273 * Breakpoint unique identifier.
1274 */
1275 breakpointId: BreakpointId;
1276 /**
1277 * Actual breakpoint location.
1278 */
1279 location: Location;
1280 }
1281 interface PausedEventDataType {
1282 /**
1283 * Call stack the virtual machine stopped on.
1284 */
1285 callFrames: CallFrame[];
1286 /**
1287 * Pause reason.
1288 */
1289 reason: string;
1290 /**
1291 * Object containing break-specific auxiliary properties.
1292 */
1293 data?: {} | undefined;
1294 /**
1295 * Hit breakpoints IDs
1296 */
1297 hitBreakpoints?: string[] | undefined;
1298 /**
1299 * Async stack trace, if any.
1300 */
1301 asyncStackTrace?: Runtime.StackTrace | undefined;
1302 /**
1303 * Async stack trace, if any.
1304 * @experimental
1305 */
1306 asyncStackTraceId?: Runtime.StackTraceId | undefined;
1307 /**
1308 * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after <code>Debugger.stepInto</code> call with <code>breakOnAsynCall</code> flag.
1309 * @experimental
1310 */
1311 asyncCallStackTraceId?: Runtime.StackTraceId | undefined;
1312 }
1313 }
1314 namespace Console {
1315 /**
1316 * Console message.
1317 */
1318 interface ConsoleMessage {
1319 /**
1320 * Message source.
1321 */
1322 source: string;
1323 /**
1324 * Message severity.
1325 */
1326 level: string;
1327 /**
1328 * Message text.
1329 */
1330 text: string;
1331 /**
1332 * URL of the message origin.
1333 */
1334 url?: string | undefined;
1335 /**
1336 * Line number in the resource that generated this message (1-based).
1337 */
1338 line?: number | undefined;
1339 /**
1340 * Column number in the resource that generated this message (1-based).
1341 */
1342 column?: number | undefined;
1343 }
1344 interface MessageAddedEventDataType {
1345 /**
1346 * Console message that has been added.
1347 */
1348 message: ConsoleMessage;
1349 }
1350 }
1351 namespace Profiler {
1352 /**
1353 * Profile node. Holds callsite information, execution statistics and child nodes.
1354 */
1355 interface ProfileNode {
1356 /**
1357 * Unique id of the node.
1358 */
1359 id: number;
1360 /**
1361 * Function location.
1362 */
1363 callFrame: Runtime.CallFrame;
1364 /**
1365 * Number of samples where this node was on top of the call stack.
1366 */
1367 hitCount?: number | undefined;
1368 /**
1369 * Child node ids.
1370 */
1371 children?: number[] | undefined;
1372 /**
1373 * The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
1374 */
1375 deoptReason?: string | undefined;
1376 /**
1377 * An array of source position ticks.
1378 */
1379 positionTicks?: PositionTickInfo[] | undefined;
1380 }
1381 /**
1382 * Profile.
1383 */
1384 interface Profile {
1385 /**
1386 * The list of profile nodes. First item is the root node.
1387 */
1388 nodes: ProfileNode[];
1389 /**
1390 * Profiling start timestamp in microseconds.
1391 */
1392 startTime: number;
1393 /**
1394 * Profiling end timestamp in microseconds.
1395 */
1396 endTime: number;
1397 /**
1398 * Ids of samples top nodes.
1399 */
1400 samples?: number[] | undefined;
1401 /**
1402 * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
1403 */
1404 timeDeltas?: number[] | undefined;
1405 }
1406 /**
1407 * Specifies a number of samples attributed to a certain source position.
1408 */
1409 interface PositionTickInfo {
1410 /**
1411 * Source line number (1-based).
1412 */
1413 line: number;
1414 /**
1415 * Number of samples attributed to the source line.
1416 */
1417 ticks: number;
1418 }
1419 /**
1420 * Coverage data for a source range.
1421 */
1422 interface CoverageRange {
1423 /**
1424 * JavaScript script source offset for the range start.
1425 */
1426 startOffset: number;
1427 /**
1428 * JavaScript script source offset for the range end.
1429 */
1430 endOffset: number;
1431 /**
1432 * Collected execution count of the source range.
1433 */
1434 count: number;
1435 }
1436 /**
1437 * Coverage data for a JavaScript function.
1438 */
1439 interface FunctionCoverage {
1440 /**
1441 * JavaScript function name.
1442 */
1443 functionName: string;
1444 /**
1445 * Source ranges inside the function with coverage data.
1446 */
1447 ranges: CoverageRange[];
1448 /**
1449 * Whether coverage data for this function has block granularity.
1450 */
1451 isBlockCoverage: boolean;
1452 }
1453 /**
1454 * Coverage data for a JavaScript script.
1455 */
1456 interface ScriptCoverage {
1457 /**
1458 * JavaScript script id.
1459 */
1460 scriptId: Runtime.ScriptId;
1461 /**
1462 * JavaScript script name or url.
1463 */
1464 url: string;
1465 /**
1466 * Functions contained in the script that has coverage data.
1467 */
1468 functions: FunctionCoverage[];
1469 }
1470 /**
1471 * Describes a type collected during runtime.
1472 * @experimental
1473 */
1474 interface TypeObject {
1475 /**
1476 * Name of a type collected with type profiling.
1477 */
1478 name: string;
1479 }
1480 /**
1481 * Source offset and types for a parameter or return value.
1482 * @experimental
1483 */
1484 interface TypeProfileEntry {
1485 /**
1486 * Source offset of the parameter or end of function for return values.
1487 */
1488 offset: number;
1489 /**
1490 * The types for this parameter or return value.
1491 */
1492 types: TypeObject[];
1493 }
1494 /**
1495 * Type profile data collected during runtime for a JavaScript script.
1496 * @experimental
1497 */
1498 interface ScriptTypeProfile {
1499 /**
1500 * JavaScript script id.
1501 */
1502 scriptId: Runtime.ScriptId;
1503 /**
1504 * JavaScript script name or url.
1505 */
1506 url: string;
1507 /**
1508 * Type profile entries for parameters and return values of the functions in the script.
1509 */
1510 entries: TypeProfileEntry[];
1511 }
1512 interface SetSamplingIntervalParameterType {
1513 /**
1514 * New sampling interval in microseconds.
1515 */
1516 interval: number;
1517 }
1518 interface StartPreciseCoverageParameterType {
1519 /**
1520 * Collect accurate call counts beyond simple 'covered' or 'not covered'.
1521 */
1522 callCount?: boolean | undefined;
1523 /**
1524 * Collect block-based coverage.
1525 */
1526 detailed?: boolean | undefined;
1527 }
1528 interface StopReturnType {
1529 /**
1530 * Recorded profile.
1531 */
1532 profile: Profile;
1533 }
1534 interface TakePreciseCoverageReturnType {
1535 /**
1536 * Coverage data for the current isolate.
1537 */
1538 result: ScriptCoverage[];
1539 }
1540 interface GetBestEffortCoverageReturnType {
1541 /**
1542 * Coverage data for the current isolate.
1543 */
1544 result: ScriptCoverage[];
1545 }
1546 interface TakeTypeProfileReturnType {
1547 /**
1548 * Type profile for all scripts since startTypeProfile() was turned on.
1549 */
1550 result: ScriptTypeProfile[];
1551 }
1552 interface ConsoleProfileStartedEventDataType {
1553 id: string;
1554 /**
1555 * Location of console.profile().
1556 */
1557 location: Debugger.Location;
1558 /**
1559 * Profile title passed as an argument to console.profile().
1560 */
1561 title?: string | undefined;
1562 }
1563 interface ConsoleProfileFinishedEventDataType {
1564 id: string;
1565 /**
1566 * Location of console.profileEnd().
1567 */
1568 location: Debugger.Location;
1569 profile: Profile;
1570 /**
1571 * Profile title passed as an argument to console.profile().
1572 */
1573 title?: string | undefined;
1574 }
1575 }
1576 namespace HeapProfiler {
1577 /**
1578 * Heap snapshot object id.
1579 */
1580 type HeapSnapshotObjectId = string;
1581 /**
1582 * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
1583 */
1584 interface SamplingHeapProfileNode {
1585 /**
1586 * Function location.
1587 */
1588 callFrame: Runtime.CallFrame;
1589 /**
1590 * Allocations size in bytes for the node excluding children.
1591 */
1592 selfSize: number;
1593 /**
1594 * Child nodes.
1595 */
1596 children: SamplingHeapProfileNode[];
1597 }
1598 /**
1599 * Profile.
1600 */
1601 interface SamplingHeapProfile {
1602 head: SamplingHeapProfileNode;
1603 }
1604 interface StartTrackingHeapObjectsParameterType {
1605 trackAllocations?: boolean | undefined;
1606 }
1607 interface StopTrackingHeapObjectsParameterType {
1608 /**
1609 * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
1610 */
1611 reportProgress?: boolean | undefined;
1612 }
1613 interface TakeHeapSnapshotParameterType {
1614 /**
1615 * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
1616 */
1617 reportProgress?: boolean | undefined;
1618 }
1619 interface GetObjectByHeapObjectIdParameterType {
1620 objectId: HeapSnapshotObjectId;
1621 /**
1622 * Symbolic group name that can be used to release multiple objects.
1623 */
1624 objectGroup?: string | undefined;
1625 }
1626 interface AddInspectedHeapObjectParameterType {
1627 /**
1628 * Heap snapshot object id to be accessible by means of $x command line API.
1629 */
1630 heapObjectId: HeapSnapshotObjectId;
1631 }
1632 interface GetHeapObjectIdParameterType {
1633 /**
1634 * Identifier of the object to get heap object id for.
1635 */
1636 objectId: Runtime.RemoteObjectId;
1637 }
1638 interface StartSamplingParameterType {
1639 /**
1640 * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
1641 */
1642 samplingInterval?: number | undefined;
1643 }
1644 interface GetObjectByHeapObjectIdReturnType {
1645 /**
1646 * Evaluation result.
1647 */
1648 result: Runtime.RemoteObject;
1649 }
1650 interface GetHeapObjectIdReturnType {
1651 /**
1652 * Id of the heap snapshot object corresponding to the passed remote object id.
1653 */
1654 heapSnapshotObjectId: HeapSnapshotObjectId;
1655 }
1656 interface StopSamplingReturnType {
1657 /**
1658 * Recorded sampling heap profile.
1659 */
1660 profile: SamplingHeapProfile;
1661 }
1662 interface GetSamplingProfileReturnType {
1663 /**
1664 * Return the sampling profile being collected.
1665 */
1666 profile: SamplingHeapProfile;
1667 }
1668 interface AddHeapSnapshotChunkEventDataType {
1669 chunk: string;
1670 }
1671 interface ReportHeapSnapshotProgressEventDataType {
1672 done: number;
1673 total: number;
1674 finished?: boolean | undefined;
1675 }
1676 interface LastSeenObjectIdEventDataType {
1677 lastSeenObjectId: number;
1678 timestamp: number;
1679 }
1680 interface HeapStatsUpdateEventDataType {
1681 /**
1682 * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
1683 */
1684 statsUpdate: number[];
1685 }
1686 }
1687 namespace NodeTracing {
1688 interface TraceConfig {
1689 /**
1690 * Controls how the trace buffer stores data.
1691 */
1692 recordMode?: string;
1693 /**
1694 * Included category filters.
1695 */
1696 includedCategories: string[];
1697 }
1698 interface StartParameterType {
1699 traceConfig: TraceConfig;
1700 }
1701 interface GetCategoriesReturnType {
1702 /**
1703 * A list of supported tracing categories.
1704 */
1705 categories: string[];
1706 }
1707 interface DataCollectedEventDataType {
1708 value: Array<{}>;
1709 }
1710 }
1711 namespace NodeWorker {
1712 type WorkerID = string;
1713 /**
1714 * Unique identifier of attached debugging session.
1715 */
1716 type SessionID = string;
1717 interface WorkerInfo {
1718 workerId: WorkerID;
1719 type: string;
1720 title: string;
1721 url: string;
1722 }
1723 interface SendMessageToWorkerParameterType {
1724 message: string;
1725 /**
1726 * Identifier of the session.
1727 */
1728 sessionId: SessionID;
1729 }
1730 interface EnableParameterType {
1731 /**
1732 * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger`
1733 * message to run them.
1734 */
1735 waitForDebuggerOnStart: boolean;
1736 }
1737 interface DetachParameterType {
1738 sessionId: SessionID;
1739 }
1740 interface AttachedToWorkerEventDataType {
1741 /**
1742 * Identifier assigned to the session used to send/receive messages.
1743 */
1744 sessionId: SessionID;
1745 workerInfo: WorkerInfo;
1746 waitingForDebugger: boolean;
1747 }
1748 interface DetachedFromWorkerEventDataType {
1749 /**
1750 * Detached session identifier.
1751 */
1752 sessionId: SessionID;
1753 }
1754 interface ReceivedMessageFromWorkerEventDataType {
1755 /**
1756 * Identifier of a session which sends a message.
1757 */
1758 sessionId: SessionID;
1759 message: string;
1760 }
1761 }
1762 namespace NodeRuntime {
1763 interface NotifyWhenWaitingForDisconnectParameterType {
1764 enabled: boolean;
1765 }
1766 }
1767 /**
1768 * The `inspector.Session` is used for dispatching messages to the V8 inspector
1769 * back-end and receiving message responses and notifications.
1770 */
1771 class Session extends EventEmitter {
1772 /**
1773 * Create a new instance of the inspector.Session class.
1774 * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend.
1775 */
1776 constructor();
1777 /**
1778 * Connects a session to the inspector back-end.
1779 * @since v8.0.0
1780 */
1781 connect(): void;
1782 /**
1783 * Immediately close the session. All pending message callbacks will be called
1784 * with an error. `session.connect()` will need to be called to be able to send
1785 * messages again. Reconnected session will lose all inspector state, such as
1786 * enabled agents or configured breakpoints.
1787 * @since v8.0.0
1788 */
1789 disconnect(): void;
1790 /**
1791 * Posts a message to the inspector back-end. `callback` will be notified when
1792 * a response is received. `callback` is a function that accepts two optional
1793 * arguments: error and message-specific result.
1794 *
1795 * ```js
1796 * session.post('Runtime.evaluate', { expression: '2 + 2' },
1797 * (error, { result }) => console.log(result));
1798 * // Output: { type: 'number', value: 4, description: '4' }
1799 * ```
1800 *
1801 * The latest version of the V8 inspector protocol is published on the[Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/).
1802 *
1803 * Node.js inspector supports all the Chrome DevTools Protocol domains declared
1804 * by V8\. Chrome DevTools Protocol domain provides an interface for interacting
1805 * with one of the runtime agents used to inspect the application state and listen
1806 * to the run-time events.
1807 *
1808 * ## Example usage
1809 *
1810 * Apart from the debugger, various V8 Profilers are available through the DevTools
1811 * protocol.
1812 * @since v8.0.0
1813 */
1814 post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void;
1815 post(method: string, callback?: (err: Error | null, params?: {}) => void): void;
1816 /**
1817 * Returns supported domains.
1818 */
1819 post(method: 'Schema.getDomains', callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
1820 /**
1821 * Evaluates expression on global object.
1822 */
1823 post(method: 'Runtime.evaluate', params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
1824 post(method: 'Runtime.evaluate', callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
1825 /**
1826 * Add handler to promise with given promise object id.
1827 */
1828 post(method: 'Runtime.awaitPromise', params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
1829 post(method: 'Runtime.awaitPromise', callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
1830 /**
1831 * Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
1832 */
1833 post(method: 'Runtime.callFunctionOn', params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
1834 post(method: 'Runtime.callFunctionOn', callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
1835 /**
1836 * Returns properties of a given object. Object group of the result is inherited from the target object.
1837 */
1838 post(method: 'Runtime.getProperties', params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
1839 post(method: 'Runtime.getProperties', callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
1840 /**
1841 * Releases remote object with given id.
1842 */
1843 post(method: 'Runtime.releaseObject', params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
1844 post(method: 'Runtime.releaseObject', callback?: (err: Error | null) => void): void;
1845 /**
1846 * Releases all remote objects that belong to a given group.
1847 */
1848 post(method: 'Runtime.releaseObjectGroup', params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
1849 post(method: 'Runtime.releaseObjectGroup', callback?: (err: Error | null) => void): void;
1850 /**
1851 * Tells inspected instance to run if it was waiting for debugger to attach.
1852 */
1853 post(method: 'Runtime.runIfWaitingForDebugger', callback?: (err: Error | null) => void): void;
1854 /**
1855 * 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.
1856 */
1857 post(method: 'Runtime.enable', callback?: (err: Error | null) => void): void;
1858 /**
1859 * Disables reporting of execution contexts creation.
1860 */
1861 post(method: 'Runtime.disable', callback?: (err: Error | null) => void): void;
1862 /**
1863 * Discards collected exceptions and console API calls.
1864 */
1865 post(method: 'Runtime.discardConsoleEntries', callback?: (err: Error | null) => void): void;
1866 /**
1867 * @experimental
1868 */
1869 post(method: 'Runtime.setCustomObjectFormatterEnabled', params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
1870 post(method: 'Runtime.setCustomObjectFormatterEnabled', callback?: (err: Error | null) => void): void;
1871 /**
1872 * Compiles expression.
1873 */
1874 post(method: 'Runtime.compileScript', params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
1875 post(method: 'Runtime.compileScript', callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
1876 /**
1877 * Runs script with given id in a given context.
1878 */
1879 post(method: 'Runtime.runScript', params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
1880 post(method: 'Runtime.runScript', callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
1881 post(method: 'Runtime.queryObjects', params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
1882 post(method: 'Runtime.queryObjects', callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
1883 /**
1884 * Returns all let, const and class variables from global scope.
1885 */
1886 post(
1887 method: 'Runtime.globalLexicalScopeNames',
1888 params?: Runtime.GlobalLexicalScopeNamesParameterType,
1889 callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void
1890 ): void;
1891 post(method: 'Runtime.globalLexicalScopeNames', callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void;
1892 /**
1893 * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
1894 */
1895 post(method: 'Debugger.enable', callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void;
1896 /**
1897 * Disables debugger for given page.
1898 */
1899 post(method: 'Debugger.disable', callback?: (err: Error | null) => void): void;
1900 /**
1901 * Activates / deactivates all breakpoints on the page.
1902 */
1903 post(method: 'Debugger.setBreakpointsActive', params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void;
1904 post(method: 'Debugger.setBreakpointsActive', callback?: (err: Error | null) => void): void;
1905 /**
1906 * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
1907 */
1908 post(method: 'Debugger.setSkipAllPauses', params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void;
1909 post(method: 'Debugger.setSkipAllPauses', callback?: (err: Error | null) => void): void;
1910 /**
1911 * 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.
1912 */
1913 post(method: 'Debugger.setBreakpointByUrl', params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
1914 post(method: 'Debugger.setBreakpointByUrl', callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
1915 /**
1916 * Sets JavaScript breakpoint at a given location.
1917 */
1918 post(method: 'Debugger.setBreakpoint', params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
1919 post(method: 'Debugger.setBreakpoint', callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
1920 /**
1921 * Removes JavaScript breakpoint.
1922 */
1923 post(method: 'Debugger.removeBreakpoint', params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
1924 post(method: 'Debugger.removeBreakpoint', callback?: (err: Error | null) => void): void;
1925 /**
1926 * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
1927 */
1928 post(
1929 method: 'Debugger.getPossibleBreakpoints',
1930 params?: Debugger.GetPossibleBreakpointsParameterType,
1931 callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void
1932 ): void;
1933 post(method: 'Debugger.getPossibleBreakpoints', callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
1934 /**
1935 * Continues execution until specific location is reached.
1936 */
1937 post(method: 'Debugger.continueToLocation', params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
1938 post(method: 'Debugger.continueToLocation', callback?: (err: Error | null) => void): void;
1939 /**
1940 * @experimental
1941 */
1942 post(method: 'Debugger.pauseOnAsyncCall', params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void;
1943 post(method: 'Debugger.pauseOnAsyncCall', callback?: (err: Error | null) => void): void;
1944 /**
1945 * Steps over the statement.
1946 */
1947 post(method: 'Debugger.stepOver', callback?: (err: Error | null) => void): void;
1948 /**
1949 * Steps into the function call.
1950 */
1951 post(method: 'Debugger.stepInto', params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void;
1952 post(method: 'Debugger.stepInto', callback?: (err: Error | null) => void): void;
1953 /**
1954 * Steps out of the function call.
1955 */
1956 post(method: 'Debugger.stepOut', callback?: (err: Error | null) => void): void;
1957 /**
1958 * Stops on the next JavaScript statement.
1959 */
1960 post(method: 'Debugger.pause', callback?: (err: Error | null) => void): void;
1961 /**
1962 * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
1963 * @experimental
1964 */
1965 post(method: 'Debugger.scheduleStepIntoAsync', callback?: (err: Error | null) => void): void;
1966 /**
1967 * Resumes JavaScript execution.
1968 */
1969 post(method: 'Debugger.resume', callback?: (err: Error | null) => void): void;
1970 /**
1971 * Returns stack trace with given <code>stackTraceId</code>.
1972 * @experimental
1973 */
1974 post(method: 'Debugger.getStackTrace', params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
1975 post(method: 'Debugger.getStackTrace', callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
1976 /**
1977 * Searches for given string in script content.
1978 */
1979 post(method: 'Debugger.searchInContent', params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
1980 post(method: 'Debugger.searchInContent', callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
1981 /**
1982 * Edits JavaScript source live.
1983 */
1984 post(method: 'Debugger.setScriptSource', params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
1985 post(method: 'Debugger.setScriptSource', callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
1986 /**
1987 * Restarts particular call frame from the beginning.
1988 */
1989 post(method: 'Debugger.restartFrame', params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
1990 post(method: 'Debugger.restartFrame', callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
1991 /**
1992 * Returns source for the script with given id.
1993 */
1994 post(method: 'Debugger.getScriptSource', params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
1995 post(method: 'Debugger.getScriptSource', callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
1996 /**
1997 * 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>.
1998 */
1999 post(method: 'Debugger.setPauseOnExceptions', params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
2000 post(method: 'Debugger.setPauseOnExceptions', callback?: (err: Error | null) => void): void;
2001 /**
2002 * Evaluates expression on a given call frame.
2003 */
2004 post(method: 'Debugger.evaluateOnCallFrame', params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
2005 post(method: 'Debugger.evaluateOnCallFrame', callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
2006 /**
2007 * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
2008 */
2009 post(method: 'Debugger.setVariableValue', params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
2010 post(method: 'Debugger.setVariableValue', callback?: (err: Error | null) => void): void;
2011 /**
2012 * Changes return value in top frame. Available only at return break position.
2013 * @experimental
2014 */
2015 post(method: 'Debugger.setReturnValue', params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void;
2016 post(method: 'Debugger.setReturnValue', callback?: (err: Error | null) => void): void;
2017 /**
2018 * Enables or disables async call stacks tracking.
2019 */
2020 post(method: 'Debugger.setAsyncCallStackDepth', params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
2021 post(method: 'Debugger.setAsyncCallStackDepth', callback?: (err: Error | null) => void): void;
2022 /**
2023 * 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.
2024 * @experimental
2025 */
2026 post(method: 'Debugger.setBlackboxPatterns', params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
2027 post(method: 'Debugger.setBlackboxPatterns', callback?: (err: Error | null) => void): void;
2028 /**
2029 * 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.
2030 * @experimental
2031 */
2032 post(method: 'Debugger.setBlackboxedRanges', params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
2033 post(method: 'Debugger.setBlackboxedRanges', callback?: (err: Error | null) => void): void;
2034 /**
2035 * Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.
2036 */
2037 post(method: 'Console.enable', callback?: (err: Error | null) => void): void;
2038 /**
2039 * Disables console domain, prevents further console messages from being reported to the client.
2040 */
2041 post(method: 'Console.disable', callback?: (err: Error | null) => void): void;
2042 /**
2043 * Does nothing.
2044 */
2045 post(method: 'Console.clearMessages', callback?: (err: Error | null) => void): void;
2046 post(method: 'Profiler.enable', callback?: (err: Error | null) => void): void;
2047 post(method: 'Profiler.disable', callback?: (err: Error | null) => void): void;
2048 /**
2049 * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
2050 */
2051 post(method: 'Profiler.setSamplingInterval', params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
2052 post(method: 'Profiler.setSamplingInterval', callback?: (err: Error | null) => void): void;
2053 post(method: 'Profiler.start', callback?: (err: Error | null) => void): void;
2054 post(method: 'Profiler.stop', callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
2055 /**
2056 * 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.
2057 */
2058 post(method: 'Profiler.startPreciseCoverage', params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
2059 post(method: 'Profiler.startPreciseCoverage', callback?: (err: Error | null) => void): void;
2060 /**
2061 * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
2062 */
2063 post(method: 'Profiler.stopPreciseCoverage', callback?: (err: Error | null) => void): void;
2064 /**
2065 * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
2066 */
2067 post(method: 'Profiler.takePreciseCoverage', callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
2068 /**
2069 * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
2070 */
2071 post(method: 'Profiler.getBestEffortCoverage', callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
2072 /**
2073 * Enable type profile.
2074 * @experimental
2075 */
2076 post(method: 'Profiler.startTypeProfile', callback?: (err: Error | null) => void): void;
2077 /**
2078 * Disable type profile. Disabling releases type profile data collected so far.
2079 * @experimental
2080 */
2081 post(method: 'Profiler.stopTypeProfile', callback?: (err: Error | null) => void): void;
2082 /**
2083 * Collect type profile.
2084 * @experimental
2085 */
2086 post(method: 'Profiler.takeTypeProfile', callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void;
2087 post(method: 'HeapProfiler.enable', callback?: (err: Error | null) => void): void;
2088 post(method: 'HeapProfiler.disable', callback?: (err: Error | null) => void): void;
2089 post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
2090 post(method: 'HeapProfiler.startTrackingHeapObjects', callback?: (err: Error | null) => void): void;
2091 post(method: 'HeapProfiler.stopTrackingHeapObjects', params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
2092 post(method: 'HeapProfiler.stopTrackingHeapObjects', callback?: (err: Error | null) => void): void;
2093 post(method: 'HeapProfiler.takeHeapSnapshot', params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
2094 post(method: 'HeapProfiler.takeHeapSnapshot', callback?: (err: Error | null) => void): void;
2095 post(method: 'HeapProfiler.collectGarbage', callback?: (err: Error | null) => void): void;
2096 post(
2097 method: 'HeapProfiler.getObjectByHeapObjectId',
2098 params?: HeapProfiler.GetObjectByHeapObjectIdParameterType,
2099 callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void
2100 ): void;
2101 post(method: 'HeapProfiler.getObjectByHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
2102 /**
2103 * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
2104 */
2105 post(method: 'HeapProfiler.addInspectedHeapObject', params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
2106 post(method: 'HeapProfiler.addInspectedHeapObject', callback?: (err: Error | null) => void): void;
2107 post(method: 'HeapProfiler.getHeapObjectId', params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
2108 post(method: 'HeapProfiler.getHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
2109 post(method: 'HeapProfiler.startSampling', params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
2110 post(method: 'HeapProfiler.startSampling', callback?: (err: Error | null) => void): void;
2111 post(method: 'HeapProfiler.stopSampling', callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
2112 post(method: 'HeapProfiler.getSamplingProfile', callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void;
2113 /**
2114 * Gets supported tracing categories.
2115 */
2116 post(method: 'NodeTracing.getCategories', callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void;
2117 /**
2118 * Start trace events collection.
2119 */
2120 post(method: 'NodeTracing.start', params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void;
2121 post(method: 'NodeTracing.start', callback?: (err: Error | null) => void): void;
2122 /**
2123 * Stop trace events collection. Remaining collected events will be sent as a sequence of
2124 * dataCollected events followed by tracingComplete event.
2125 */
2126 post(method: 'NodeTracing.stop', callback?: (err: Error | null) => void): void;
2127 /**
2128 * Sends protocol message over session with given id.
2129 */
2130 post(method: 'NodeWorker.sendMessageToWorker', params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void;
2131 post(method: 'NodeWorker.sendMessageToWorker', callback?: (err: Error | null) => void): void;
2132 /**
2133 * Instructs the inspector to attach to running workers. Will also attach to new workers
2134 * as they start
2135 */
2136 post(method: 'NodeWorker.enable', params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void;
2137 post(method: 'NodeWorker.enable', callback?: (err: Error | null) => void): void;
2138 /**
2139 * Detaches from all running workers and disables attaching to new workers as they are started.
2140 */
2141 post(method: 'NodeWorker.disable', callback?: (err: Error | null) => void): void;
2142 /**
2143 * Detached from the worker with given sessionId.
2144 */
2145 post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void;
2146 post(method: 'NodeWorker.detach', callback?: (err: Error | null) => void): void;
2147 /**
2148 * Enable the `NodeRuntime.waitingForDisconnect`.
2149 */
2150 post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void;
2151 post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', callback?: (err: Error | null) => void): void;
2152 // Events
2153 addListener(event: string, listener: (...args: any[]) => void): this;
2154 /**
2155 * Emitted when any notification from the V8 Inspector is received.
2156 */
2157 addListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
2158 /**
2159 * Issued when new execution context is created.
2160 */
2161 addListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2162 /**
2163 * Issued when execution context is destroyed.
2164 */
2165 addListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2166 /**
2167 * Issued when all executionContexts were cleared in browser
2168 */
2169 addListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
2170 /**
2171 * Issued when exception was thrown and unhandled.
2172 */
2173 addListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2174 /**
2175 * Issued when unhandled exception was revoked.
2176 */
2177 addListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2178 /**
2179 * Issued when console API was called.
2180 */
2181 addListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2182 /**
2183 * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2184 */
2185 addListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2186 /**
2187 * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2188 */
2189 addListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2190 /**
2191 * Fired when virtual machine fails to parse the script.
2192 */
2193 addListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2194 /**
2195 * Fired when breakpoint is resolved to an actual script and location.
2196 */
2197 addListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
2198 /**
2199 * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
2200 */
2201 addListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
2202 /**
2203 * Fired when the virtual machine resumed execution.
2204 */
2205 addListener(event: 'Debugger.resumed', listener: () => void): this;
2206 /**
2207 * Issued when new console message is added.
2208 */
2209 addListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2210 /**
2211 * Sent when new profile recording is started using console.profile() call.
2212 */
2213 addListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2214 addListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2215 addListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2216 addListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
2217 addListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2218 /**
2219 * 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.
2220 */
2221 addListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2222 /**
2223 * If heap objects tracking has been started then backend may send update for one or more fragments
2224 */
2225 addListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2226 /**
2227 * Contains an bucket of collected trace events.
2228 */
2229 addListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2230 /**
2231 * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2232 * delivered via dataCollected events.
2233 */
2234 addListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
2235 /**
2236 * Issued when attached to a worker.
2237 */
2238 addListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
2239 /**
2240 * Issued when detached from the worker.
2241 */
2242 addListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
2243 /**
2244 * Notifies about a new protocol message received from the session
2245 * (session ID is provided in attachedToWorker notification).
2246 */
2247 addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
2248 /**
2249 * This event is fired instead of `Runtime.executionContextDestroyed` when
2250 * enabled.
2251 * It is fired when the Node process finished all code execution and is
2252 * waiting for all frontends to disconnect.
2253 */
2254 addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
2255 emit(event: string | symbol, ...args: any[]): boolean;
2256 emit(event: 'inspectorNotification', message: InspectorNotification<{}>): boolean;
2257 emit(event: 'Runtime.executionContextCreated', message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
2258 emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
2259 emit(event: 'Runtime.executionContextsCleared'): boolean;
2260 emit(event: 'Runtime.exceptionThrown', message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
2261 emit(event: 'Runtime.exceptionRevoked', message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
2262 emit(event: 'Runtime.consoleAPICalled', message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
2263 emit(event: 'Runtime.inspectRequested', message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
2264 emit(event: 'Debugger.scriptParsed', message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
2265 emit(event: 'Debugger.scriptFailedToParse', message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
2266 emit(event: 'Debugger.breakpointResolved', message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
2267 emit(event: 'Debugger.paused', message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
2268 emit(event: 'Debugger.resumed'): boolean;
2269 emit(event: 'Console.messageAdded', message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
2270 emit(event: 'Profiler.consoleProfileStarted', message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
2271 emit(event: 'Profiler.consoleProfileFinished', message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
2272 emit(event: 'HeapProfiler.addHeapSnapshotChunk', message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
2273 emit(event: 'HeapProfiler.resetProfiles'): boolean;
2274 emit(event: 'HeapProfiler.reportHeapSnapshotProgress', message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
2275 emit(event: 'HeapProfiler.lastSeenObjectId', message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
2276 emit(event: 'HeapProfiler.heapStatsUpdate', message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
2277 emit(event: 'NodeTracing.dataCollected', message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
2278 emit(event: 'NodeTracing.tracingComplete'): boolean;
2279 emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
2280 emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
2281 emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
2282 emit(event: 'NodeRuntime.waitingForDisconnect'): boolean;
2283 on(event: string, listener: (...args: any[]) => void): this;
2284 /**
2285 * Emitted when any notification from the V8 Inspector is received.
2286 */
2287 on(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
2288 /**
2289 * Issued when new execution context is created.
2290 */
2291 on(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2292 /**
2293 * Issued when execution context is destroyed.
2294 */
2295 on(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2296 /**
2297 * Issued when all executionContexts were cleared in browser
2298 */
2299 on(event: 'Runtime.executionContextsCleared', listener: () => void): this;
2300 /**
2301 * Issued when exception was thrown and unhandled.
2302 */
2303 on(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2304 /**
2305 * Issued when unhandled exception was revoked.
2306 */
2307 on(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2308 /**
2309 * Issued when console API was called.
2310 */
2311 on(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2312 /**
2313 * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2314 */
2315 on(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2316 /**
2317 * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2318 */
2319 on(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2320 /**
2321 * Fired when virtual machine fails to parse the script.
2322 */
2323 on(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2324 /**
2325 * Fired when breakpoint is resolved to an actual script and location.
2326 */
2327 on(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
2328 /**
2329 * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
2330 */
2331 on(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
2332 /**
2333 * Fired when the virtual machine resumed execution.
2334 */
2335 on(event: 'Debugger.resumed', listener: () => void): this;
2336 /**
2337 * Issued when new console message is added.
2338 */
2339 on(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2340 /**
2341 * Sent when new profile recording is started using console.profile() call.
2342 */
2343 on(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2344 on(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2345 on(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2346 on(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
2347 on(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2348 /**
2349 * 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.
2350 */
2351 on(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2352 /**
2353 * If heap objects tracking has been started then backend may send update for one or more fragments
2354 */
2355 on(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2356 /**
2357 * Contains an bucket of collected trace events.
2358 */
2359 on(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2360 /**
2361 * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2362 * delivered via dataCollected events.
2363 */
2364 on(event: 'NodeTracing.tracingComplete', listener: () => void): this;
2365 /**
2366 * Issued when attached to a worker.
2367 */
2368 on(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
2369 /**
2370 * Issued when detached from the worker.
2371 */
2372 on(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
2373 /**
2374 * Notifies about a new protocol message received from the session
2375 * (session ID is provided in attachedToWorker notification).
2376 */
2377 on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
2378 /**
2379 * This event is fired instead of `Runtime.executionContextDestroyed` when
2380 * enabled.
2381 * It is fired when the Node process finished all code execution and is
2382 * waiting for all frontends to disconnect.
2383 */
2384 on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
2385 once(event: string, listener: (...args: any[]) => void): this;
2386 /**
2387 * Emitted when any notification from the V8 Inspector is received.
2388 */
2389 once(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
2390 /**
2391 * Issued when new execution context is created.
2392 */
2393 once(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2394 /**
2395 * Issued when execution context is destroyed.
2396 */
2397 once(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2398 /**
2399 * Issued when all executionContexts were cleared in browser
2400 */
2401 once(event: 'Runtime.executionContextsCleared', listener: () => void): this;
2402 /**
2403 * Issued when exception was thrown and unhandled.
2404 */
2405 once(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2406 /**
2407 * Issued when unhandled exception was revoked.
2408 */
2409 once(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2410 /**
2411 * Issued when console API was called.
2412 */
2413 once(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2414 /**
2415 * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2416 */
2417 once(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2418 /**
2419 * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2420 */
2421 once(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2422 /**
2423 * Fired when virtual machine fails to parse the script.
2424 */
2425 once(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2426 /**
2427 * Fired when breakpoint is resolved to an actual script and location.
2428 */
2429 once(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
2430 /**
2431 * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
2432 */
2433 once(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
2434 /**
2435 * Fired when the virtual machine resumed execution.
2436 */
2437 once(event: 'Debugger.resumed', listener: () => void): this;
2438 /**
2439 * Issued when new console message is added.
2440 */
2441 once(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2442 /**
2443 * Sent when new profile recording is started using console.profile() call.
2444 */
2445 once(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2446 once(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2447 once(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2448 once(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
2449 once(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2450 /**
2451 * 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.
2452 */
2453 once(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2454 /**
2455 * If heap objects tracking has been started then backend may send update for one or more fragments
2456 */
2457 once(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2458 /**
2459 * Contains an bucket of collected trace events.
2460 */
2461 once(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2462 /**
2463 * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2464 * delivered via dataCollected events.
2465 */
2466 once(event: 'NodeTracing.tracingComplete', listener: () => void): this;
2467 /**
2468 * Issued when attached to a worker.
2469 */
2470 once(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
2471 /**
2472 * Issued when detached from the worker.
2473 */
2474 once(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
2475 /**
2476 * Notifies about a new protocol message received from the session
2477 * (session ID is provided in attachedToWorker notification).
2478 */
2479 once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
2480 /**
2481 * This event is fired instead of `Runtime.executionContextDestroyed` when
2482 * enabled.
2483 * It is fired when the Node process finished all code execution and is
2484 * waiting for all frontends to disconnect.
2485 */
2486 once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
2487 prependListener(event: string, listener: (...args: any[]) => void): this;
2488 /**
2489 * Emitted when any notification from the V8 Inspector is received.
2490 */
2491 prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
2492 /**
2493 * Issued when new execution context is created.
2494 */
2495 prependListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2496 /**
2497 * Issued when execution context is destroyed.
2498 */
2499 prependListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2500 /**
2501 * Issued when all executionContexts were cleared in browser
2502 */
2503 prependListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
2504 /**
2505 * Issued when exception was thrown and unhandled.
2506 */
2507 prependListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2508 /**
2509 * Issued when unhandled exception was revoked.
2510 */
2511 prependListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2512 /**
2513 * Issued when console API was called.
2514 */
2515 prependListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2516 /**
2517 * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2518 */
2519 prependListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2520 /**
2521 * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2522 */
2523 prependListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2524 /**
2525 * Fired when virtual machine fails to parse the script.
2526 */
2527 prependListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2528 /**
2529 * Fired when breakpoint is resolved to an actual script and location.
2530 */
2531 prependListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
2532 /**
2533 * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
2534 */
2535 prependListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
2536 /**
2537 * Fired when the virtual machine resumed execution.
2538 */
2539 prependListener(event: 'Debugger.resumed', listener: () => void): this;
2540 /**
2541 * Issued when new console message is added.
2542 */
2543 prependListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2544 /**
2545 * Sent when new profile recording is started using console.profile() call.
2546 */
2547 prependListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2548 prependListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2549 prependListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2550 prependListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
2551 prependListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2552 /**
2553 * 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.
2554 */
2555 prependListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2556 /**
2557 * If heap objects tracking has been started then backend may send update for one or more fragments
2558 */
2559 prependListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2560 /**
2561 * Contains an bucket of collected trace events.
2562 */
2563 prependListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2564 /**
2565 * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2566 * delivered via dataCollected events.
2567 */
2568 prependListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
2569 /**
2570 * Issued when attached to a worker.
2571 */
2572 prependListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
2573 /**
2574 * Issued when detached from the worker.
2575 */
2576 prependListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
2577 /**
2578 * Notifies about a new protocol message received from the session
2579 * (session ID is provided in attachedToWorker notification).
2580 */
2581 prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
2582 /**
2583 * This event is fired instead of `Runtime.executionContextDestroyed` when
2584 * enabled.
2585 * It is fired when the Node process finished all code execution and is
2586 * waiting for all frontends to disconnect.
2587 */
2588 prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
2589 prependOnceListener(event: string, listener: (...args: any[]) => void): this;
2590 /**
2591 * Emitted when any notification from the V8 Inspector is received.
2592 */
2593 prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
2594 /**
2595 * Issued when new execution context is created.
2596 */
2597 prependOnceListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2598 /**
2599 * Issued when execution context is destroyed.
2600 */
2601 prependOnceListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2602 /**
2603 * Issued when all executionContexts were cleared in browser
2604 */
2605 prependOnceListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
2606 /**
2607 * Issued when exception was thrown and unhandled.
2608 */
2609 prependOnceListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2610 /**
2611 * Issued when unhandled exception was revoked.
2612 */
2613 prependOnceListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2614 /**
2615 * Issued when console API was called.
2616 */
2617 prependOnceListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2618 /**
2619 * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2620 */
2621 prependOnceListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2622 /**
2623 * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2624 */
2625 prependOnceListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2626 /**
2627 * Fired when virtual machine fails to parse the script.
2628 */
2629 prependOnceListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2630 /**
2631 * Fired when breakpoint is resolved to an actual script and location.
2632 */
2633 prependOnceListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
2634 /**
2635 * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
2636 */
2637 prependOnceListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
2638 /**
2639 * Fired when the virtual machine resumed execution.
2640 */
2641 prependOnceListener(event: 'Debugger.resumed', listener: () => void): this;
2642 /**
2643 * Issued when new console message is added.
2644 */
2645 prependOnceListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2646 /**
2647 * Sent when new profile recording is started using console.profile() call.
2648 */
2649 prependOnceListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2650 prependOnceListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2651 prependOnceListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2652 prependOnceListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
2653 prependOnceListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2654 /**
2655 * 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.
2656 */
2657 prependOnceListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2658 /**
2659 * If heap objects tracking has been started then backend may send update for one or more fragments
2660 */
2661 prependOnceListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2662 /**
2663 * Contains an bucket of collected trace events.
2664 */
2665 prependOnceListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2666 /**
2667 * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2668 * delivered via dataCollected events.
2669 */
2670 prependOnceListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
2671 /**
2672 * Issued when attached to a worker.
2673 */
2674 prependOnceListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
2675 /**
2676 * Issued when detached from the worker.
2677 */
2678 prependOnceListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
2679 /**
2680 * Notifies about a new protocol message received from the session
2681 * (session ID is provided in attachedToWorker notification).
2682 */
2683 prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
2684 /**
2685 * This event is fired instead of `Runtime.executionContextDestroyed` when
2686 * enabled.
2687 * It is fired when the Node process finished all code execution and is
2688 * waiting for all frontends to disconnect.
2689 */
2690 prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
2691 }
2692 /**
2693 * Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has
2694 * started.
2695 *
2696 * If wait is `true`, will block until a client has connected to the inspect port
2697 * and flow control has been passed to the debugger client.
2698 *
2699 * See the `security warning` regarding the `host`parameter usage.
2700 * @param port Port to listen on for inspector connections. Optional.
2701 * @param host Host to listen on for inspector connections. Optional.
2702 * @param wait Block until a client has connected. Optional.
2703 */
2704 function open(port?: number, host?: string, wait?: boolean): void;
2705 /**
2706 * Deactivate the inspector. Blocks until there are no active connections.
2707 */
2708 function close(): void;
2709 /**
2710 * Return the URL of the active inspector, or `undefined` if there is none.
2711 *
2712 * ```console
2713 * $ node --inspect -p 'inspector.url()'
2714 * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
2715 * For help see https://nodejs.org/en/docs/inspector
2716 * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
2717 *
2718 * $ node --inspect=localhost:3000 -p 'inspector.url()'
2719 * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
2720 * For help see https://nodejs.org/en/docs/inspector
2721 * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
2722 *
2723 * $ node -p 'inspector.url()'
2724 * undefined
2725 * ```
2726 */
2727 function url(): string | undefined;
2728 /**
2729 * Blocks until a client (existing or connected later) has sent`Runtime.runIfWaitingForDebugger` command.
2730 *
2731 * An exception will be thrown if there is no active inspector.
2732 * @since v12.7.0
2733 */
2734 function waitForDebugger(): void;
2735}
2736declare module 'node:inspector' {
2737 import EventEmitter = require('inspector');
2738 export = EventEmitter;
2739}
2740
\No newline at end of file