@types/node 22.4.2 → 22.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- node/README.md +1 -1
- node/http.d.ts +13 -0
- node/index.d.ts +1 -0
- node/inspector.d.ts +1060 -110
- node/package.json +2 -2
- node/path.d.ts +9 -0
- node/process.d.ts +37 -3
- node/sqlite.d.ts +213 -0
- node/worker_threads.d.ts +18 -0
node/inspector.d.ts
CHANGED
@@ -1,33 +1,21 @@
|
|
1
|
-
//
|
2
|
-
|
3
|
-
//
|
4
|
-
//
|
5
|
-
// for more information.
|
6
|
-
|
1
|
+
// These definitions are automatically generated by the generate-inspector script.
|
2
|
+
// Do not edit this file directly.
|
3
|
+
// See scripts/generate-inspector/README.md for information on how to update the protocol definitions.
|
4
|
+
// Changes to the module itself should be added to the generator template (scripts/generate-inspector/inspector.d.ts.template).
|
7
5
|
|
8
6
|
/**
|
9
7
|
* The `node:inspector` module provides an API for interacting with the V8
|
10
8
|
* inspector.
|
11
|
-
*
|
12
|
-
* It can be accessed using:
|
13
|
-
*
|
14
|
-
* ```js
|
15
|
-
* import * as inspector from 'node:inspector/promises';
|
16
|
-
* ```
|
17
|
-
*
|
18
|
-
* or
|
19
|
-
*
|
20
|
-
* ```js
|
21
|
-
* import * as inspector from 'node:inspector';
|
22
|
-
* ```
|
23
9
|
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/inspector.js)
|
24
10
|
*/
|
25
11
|
declare module 'inspector' {
|
26
12
|
import EventEmitter = require('node:events');
|
13
|
+
|
27
14
|
interface InspectorNotification<T> {
|
28
15
|
method: string;
|
29
16
|
params: T;
|
30
17
|
}
|
18
|
+
|
31
19
|
namespace Schema {
|
32
20
|
/**
|
33
21
|
* Description of the protocol domain.
|
@@ -1471,48 +1459,6 @@ declare module 'inspector' {
|
|
1471
1459
|
*/
|
1472
1460
|
functions: FunctionCoverage[];
|
1473
1461
|
}
|
1474
|
-
/**
|
1475
|
-
* Describes a type collected during runtime.
|
1476
|
-
* @experimental
|
1477
|
-
*/
|
1478
|
-
interface TypeObject {
|
1479
|
-
/**
|
1480
|
-
* Name of a type collected with type profiling.
|
1481
|
-
*/
|
1482
|
-
name: string;
|
1483
|
-
}
|
1484
|
-
/**
|
1485
|
-
* Source offset and types for a parameter or return value.
|
1486
|
-
* @experimental
|
1487
|
-
*/
|
1488
|
-
interface TypeProfileEntry {
|
1489
|
-
/**
|
1490
|
-
* Source offset of the parameter or end of function for return values.
|
1491
|
-
*/
|
1492
|
-
offset: number;
|
1493
|
-
/**
|
1494
|
-
* The types for this parameter or return value.
|
1495
|
-
*/
|
1496
|
-
types: TypeObject[];
|
1497
|
-
}
|
1498
|
-
/**
|
1499
|
-
* Type profile data collected during runtime for a JavaScript script.
|
1500
|
-
* @experimental
|
1501
|
-
*/
|
1502
|
-
interface ScriptTypeProfile {
|
1503
|
-
/**
|
1504
|
-
* JavaScript script id.
|
1505
|
-
*/
|
1506
|
-
scriptId: Runtime.ScriptId;
|
1507
|
-
/**
|
1508
|
-
* JavaScript script name or url.
|
1509
|
-
*/
|
1510
|
-
url: string;
|
1511
|
-
/**
|
1512
|
-
* Type profile entries for parameters and return values of the functions in the script.
|
1513
|
-
*/
|
1514
|
-
entries: TypeProfileEntry[];
|
1515
|
-
}
|
1516
1462
|
interface SetSamplingIntervalParameterType {
|
1517
1463
|
/**
|
1518
1464
|
* New sampling interval in microseconds.
|
@@ -1547,12 +1493,6 @@ declare module 'inspector' {
|
|
1547
1493
|
*/
|
1548
1494
|
result: ScriptCoverage[];
|
1549
1495
|
}
|
1550
|
-
interface TakeTypeProfileReturnType {
|
1551
|
-
/**
|
1552
|
-
* Type profile for all scripts since startTypeProfile() was turned on.
|
1553
|
-
*/
|
1554
|
-
result: ScriptTypeProfile[];
|
1555
|
-
}
|
1556
1496
|
interface ConsoleProfileStartedEventDataType {
|
1557
1497
|
id: string;
|
1558
1498
|
/**
|
@@ -1768,6 +1708,7 @@ declare module 'inspector' {
|
|
1768
1708
|
enabled: boolean;
|
1769
1709
|
}
|
1770
1710
|
}
|
1711
|
+
|
1771
1712
|
/**
|
1772
1713
|
* The `inspector.Session` is used for dispatching messages to the V8 inspector
|
1773
1714
|
* back-end and receiving message responses and notifications.
|
@@ -1775,22 +1716,29 @@ declare module 'inspector' {
|
|
1775
1716
|
class Session extends EventEmitter {
|
1776
1717
|
/**
|
1777
1718
|
* Create a new instance of the inspector.Session class.
|
1778
|
-
* The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend.
|
1719
|
+
* The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
|
1779
1720
|
*/
|
1780
1721
|
constructor();
|
1722
|
+
|
1781
1723
|
/**
|
1782
1724
|
* Connects a session to the inspector back-end.
|
1783
|
-
* @since v8.0.0
|
1784
1725
|
*/
|
1785
1726
|
connect(): void;
|
1727
|
+
|
1728
|
+
/**
|
1729
|
+
* Connects a session to the inspector back-end.
|
1730
|
+
* An exception will be thrown if this API was not called on a Worker thread.
|
1731
|
+
* @since v12.11.0
|
1732
|
+
*/
|
1733
|
+
connectToMainThread(): void;
|
1734
|
+
|
1786
1735
|
/**
|
1787
|
-
* Immediately close the session. All pending message callbacks will be called
|
1788
|
-
*
|
1789
|
-
*
|
1790
|
-
* enabled agents or configured breakpoints.
|
1791
|
-
* @since v8.0.0
|
1736
|
+
* Immediately close the session. All pending message callbacks will be called with an error.
|
1737
|
+
* `session.connect()` will need to be called to be able to send messages again.
|
1738
|
+
* Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
|
1792
1739
|
*/
|
1793
1740
|
disconnect(): void;
|
1741
|
+
|
1794
1742
|
/**
|
1795
1743
|
* Posts a message to the inspector back-end. `callback` will be notified when
|
1796
1744
|
* a response is received. `callback` is a function that accepts two optional
|
@@ -1802,21 +1750,16 @@ declare module 'inspector' {
|
|
1802
1750
|
* // Output: { type: 'number', value: 4, description: '4' }
|
1803
1751
|
* ```
|
1804
1752
|
*
|
1805
|
-
* The latest version of the V8 inspector protocol is published on the
|
1753
|
+
* The latest version of the V8 inspector protocol is published on the
|
1754
|
+
* [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/).
|
1806
1755
|
*
|
1807
1756
|
* Node.js inspector supports all the Chrome DevTools Protocol domains declared
|
1808
|
-
* by V8
|
1757
|
+
* by V8. Chrome DevTools Protocol domain provides an interface for interacting
|
1809
1758
|
* with one of the runtime agents used to inspect the application state and listen
|
1810
1759
|
* to the run-time events.
|
1811
|
-
*
|
1812
|
-
* ## Example usage
|
1813
|
-
*
|
1814
|
-
* Apart from the debugger, various V8 Profilers are available through the DevTools
|
1815
|
-
* protocol.
|
1816
|
-
* @since v8.0.0
|
1817
1760
|
*/
|
1818
|
-
post(method: string,
|
1819
|
-
post(method: string, callback?: (err: Error | null, params?:
|
1761
|
+
post(method: string, callback?: (err: Error | null, params?: object) => void): void;
|
1762
|
+
post(method: string, params?: object, callback?: (err: Error | null, params?: object) => void): void;
|
1820
1763
|
/**
|
1821
1764
|
* Returns supported domains.
|
1822
1765
|
*/
|
@@ -2073,21 +2016,6 @@ declare module 'inspector' {
|
|
2073
2016
|
* Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
|
2074
2017
|
*/
|
2075
2018
|
post(method: 'Profiler.getBestEffortCoverage', callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
|
2076
|
-
/**
|
2077
|
-
* Enable type profile.
|
2078
|
-
* @experimental
|
2079
|
-
*/
|
2080
|
-
post(method: 'Profiler.startTypeProfile', callback?: (err: Error | null) => void): void;
|
2081
|
-
/**
|
2082
|
-
* Disable type profile. Disabling releases type profile data collected so far.
|
2083
|
-
* @experimental
|
2084
|
-
*/
|
2085
|
-
post(method: 'Profiler.stopTypeProfile', callback?: (err: Error | null) => void): void;
|
2086
|
-
/**
|
2087
|
-
* Collect type profile.
|
2088
|
-
* @experimental
|
2089
|
-
*/
|
2090
|
-
post(method: 'Profiler.takeTypeProfile', callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void;
|
2091
2019
|
post(method: 'HeapProfiler.enable', callback?: (err: Error | null) => void): void;
|
2092
2020
|
post(method: 'HeapProfiler.disable', callback?: (err: Error | null) => void): void;
|
2093
2021
|
post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
|
@@ -2148,17 +2076,25 @@ declare module 'inspector' {
|
|
2148
2076
|
*/
|
2149
2077
|
post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void;
|
2150
2078
|
post(method: 'NodeWorker.detach', callback?: (err: Error | null) => void): void;
|
2079
|
+
/**
|
2080
|
+
* Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`.
|
2081
|
+
*/
|
2082
|
+
post(method: 'NodeRuntime.enable', callback?: (err: Error | null) => void): void;
|
2083
|
+
/**
|
2084
|
+
* Disable NodeRuntime events
|
2085
|
+
*/
|
2086
|
+
post(method: 'NodeRuntime.disable', callback?: (err: Error | null) => void): void;
|
2151
2087
|
/**
|
2152
2088
|
* Enable the `NodeRuntime.waitingForDisconnect`.
|
2153
2089
|
*/
|
2154
2090
|
post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void;
|
2155
2091
|
post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', callback?: (err: Error | null) => void): void;
|
2156
|
-
|
2092
|
+
|
2157
2093
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
2158
2094
|
/**
|
2159
2095
|
* Emitted when any notification from the V8 Inspector is received.
|
2160
2096
|
*/
|
2161
|
-
addListener(event: 'inspectorNotification', listener: (message: InspectorNotification<
|
2097
|
+
addListener(event: 'inspectorNotification', listener: (message: InspectorNotification<object>) => void): this;
|
2162
2098
|
/**
|
2163
2099
|
* Issued when new execution context is created.
|
2164
2100
|
*/
|
@@ -2256,8 +2192,13 @@ declare module 'inspector' {
|
|
2256
2192
|
* waiting for all frontends to disconnect.
|
2257
2193
|
*/
|
2258
2194
|
addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
|
2195
|
+
/**
|
2196
|
+
* This event is fired when the runtime is waiting for the debugger. For
|
2197
|
+
* example, when inspector.waitingForDebugger is called
|
2198
|
+
*/
|
2199
|
+
addListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
2259
2200
|
emit(event: string | symbol, ...args: any[]): boolean;
|
2260
|
-
emit(event: 'inspectorNotification', message: InspectorNotification<
|
2201
|
+
emit(event: 'inspectorNotification', message: InspectorNotification<object>): boolean;
|
2261
2202
|
emit(event: 'Runtime.executionContextCreated', message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
|
2262
2203
|
emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
|
2263
2204
|
emit(event: 'Runtime.executionContextsCleared'): boolean;
|
@@ -2284,11 +2225,12 @@ declare module 'inspector' {
|
|
2284
2225
|
emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
|
2285
2226
|
emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
|
2286
2227
|
emit(event: 'NodeRuntime.waitingForDisconnect'): boolean;
|
2228
|
+
emit(event: 'NodeRuntime.waitingForDebugger'): boolean;
|
2287
2229
|
on(event: string, listener: (...args: any[]) => void): this;
|
2288
2230
|
/**
|
2289
2231
|
* Emitted when any notification from the V8 Inspector is received.
|
2290
2232
|
*/
|
2291
|
-
on(event: 'inspectorNotification', listener: (message: InspectorNotification<
|
2233
|
+
on(event: 'inspectorNotification', listener: (message: InspectorNotification<object>) => void): this;
|
2292
2234
|
/**
|
2293
2235
|
* Issued when new execution context is created.
|
2294
2236
|
*/
|
@@ -2386,11 +2328,16 @@ declare module 'inspector' {
|
|
2386
2328
|
* waiting for all frontends to disconnect.
|
2387
2329
|
*/
|
2388
2330
|
on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
|
2331
|
+
/**
|
2332
|
+
* This event is fired when the runtime is waiting for the debugger. For
|
2333
|
+
* example, when inspector.waitingForDebugger is called
|
2334
|
+
*/
|
2335
|
+
on(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
2389
2336
|
once(event: string, listener: (...args: any[]) => void): this;
|
2390
2337
|
/**
|
2391
2338
|
* Emitted when any notification from the V8 Inspector is received.
|
2392
2339
|
*/
|
2393
|
-
once(event: 'inspectorNotification', listener: (message: InspectorNotification<
|
2340
|
+
once(event: 'inspectorNotification', listener: (message: InspectorNotification<object>) => void): this;
|
2394
2341
|
/**
|
2395
2342
|
* Issued when new execution context is created.
|
2396
2343
|
*/
|
@@ -2488,11 +2435,16 @@ declare module 'inspector' {
|
|
2488
2435
|
* waiting for all frontends to disconnect.
|
2489
2436
|
*/
|
2490
2437
|
once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
|
2438
|
+
/**
|
2439
|
+
* This event is fired when the runtime is waiting for the debugger. For
|
2440
|
+
* example, when inspector.waitingForDebugger is called
|
2441
|
+
*/
|
2442
|
+
once(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
2491
2443
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
2492
2444
|
/**
|
2493
2445
|
* Emitted when any notification from the V8 Inspector is received.
|
2494
2446
|
*/
|
2495
|
-
prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification<
|
2447
|
+
prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification<object>) => void): this;
|
2496
2448
|
/**
|
2497
2449
|
* Issued when new execution context is created.
|
2498
2450
|
*/
|
@@ -2590,11 +2542,16 @@ declare module 'inspector' {
|
|
2590
2542
|
* waiting for all frontends to disconnect.
|
2591
2543
|
*/
|
2592
2544
|
prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
|
2545
|
+
/**
|
2546
|
+
* This event is fired when the runtime is waiting for the debugger. For
|
2547
|
+
* example, when inspector.waitingForDebugger is called
|
2548
|
+
*/
|
2549
|
+
prependListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
2593
2550
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
2594
2551
|
/**
|
2595
2552
|
* Emitted when any notification from the V8 Inspector is received.
|
2596
2553
|
*/
|
2597
|
-
prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification<
|
2554
|
+
prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification<object>) => void): this;
|
2598
2555
|
/**
|
2599
2556
|
* Issued when new execution context is created.
|
2600
2557
|
*/
|
@@ -2692,7 +2649,13 @@ declare module 'inspector' {
|
|
2692
2649
|
* waiting for all frontends to disconnect.
|
2693
2650
|
*/
|
2694
2651
|
prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
|
2652
|
+
/**
|
2653
|
+
* This event is fired when the runtime is waiting for the debugger. For
|
2654
|
+
* example, when inspector.waitingForDebugger is called
|
2655
|
+
*/
|
2656
|
+
prependOnceListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
2695
2657
|
}
|
2658
|
+
|
2696
2659
|
/**
|
2697
2660
|
* Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has
|
2698
2661
|
* started.
|
@@ -2700,17 +2663,20 @@ declare module 'inspector' {
|
|
2700
2663
|
* If wait is `true`, will block until a client has connected to the inspect port
|
2701
2664
|
* and flow control has been passed to the debugger client.
|
2702
2665
|
*
|
2703
|
-
* See the
|
2704
|
-
*
|
2705
|
-
* @param
|
2706
|
-
* @param
|
2666
|
+
* See the [security warning](https://nodejs.org/docs/latest-v22.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure)
|
2667
|
+
* regarding the `host` parameter usage.
|
2668
|
+
* @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI.
|
2669
|
+
* @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI.
|
2670
|
+
* @param wait Block until a client has connected. Defaults to what was specified on the CLI.
|
2707
2671
|
* @returns Disposable that calls `inspector.close()`.
|
2708
2672
|
*/
|
2709
2673
|
function open(port?: number, host?: string, wait?: boolean): Disposable;
|
2674
|
+
|
2710
2675
|
/**
|
2711
2676
|
* Deactivate the inspector. Blocks until there are no active connections.
|
2712
2677
|
*/
|
2713
2678
|
function close(): void;
|
2679
|
+
|
2714
2680
|
/**
|
2715
2681
|
* Return the URL of the active inspector, or `undefined` if there is none.
|
2716
2682
|
*
|
@@ -2730,6 +2696,7 @@ declare module 'inspector' {
|
|
2730
2696
|
* ```
|
2731
2697
|
*/
|
2732
2698
|
function url(): string | undefined;
|
2699
|
+
|
2733
2700
|
/**
|
2734
2701
|
* Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command.
|
2735
2702
|
*
|
@@ -2737,10 +2704,993 @@ declare module 'inspector' {
|
|
2737
2704
|
* @since v12.7.0
|
2738
2705
|
*/
|
2739
2706
|
function waitForDebugger(): void;
|
2707
|
+
|
2708
|
+
// These methods are exposed by the V8 inspector console API (inspector/v8-console.h).
|
2709
|
+
// The method signatures differ from those of the Node.js console, and are deliberately
|
2710
|
+
// typed permissively.
|
2711
|
+
interface InspectorConsole {
|
2712
|
+
debug(...data: any[]): void;
|
2713
|
+
error(...data: any[]): void;
|
2714
|
+
info(...data: any[]): void;
|
2715
|
+
log(...data: any[]): void;
|
2716
|
+
warn(...data: any[]): void;
|
2717
|
+
dir(...data: any[]): void;
|
2718
|
+
dirxml(...data: any[]): void;
|
2719
|
+
table(...data: any[]): void;
|
2720
|
+
trace(...data: any[]): void;
|
2721
|
+
group(...data: any[]): void;
|
2722
|
+
groupCollapsed(...data: any[]): void;
|
2723
|
+
groupEnd(...data: any[]): void;
|
2724
|
+
clear(...data: any[]): void;
|
2725
|
+
count(label?: any): void;
|
2726
|
+
countReset(label?: any): void;
|
2727
|
+
assert(value?: any, ...data: any[]): void;
|
2728
|
+
profile(label?: any): void;
|
2729
|
+
profileEnd(label?: any): void;
|
2730
|
+
time(label?: any): void;
|
2731
|
+
timeLog(label?: any): void;
|
2732
|
+
timeStamp(label?: any): void;
|
2733
|
+
}
|
2734
|
+
|
2735
|
+
/**
|
2736
|
+
* An object to send messages to the remote inspector console.
|
2737
|
+
* @since v11.0.0
|
2738
|
+
*/
|
2739
|
+
const console: InspectorConsole;
|
2740
2740
|
}
|
2741
|
+
|
2741
2742
|
/**
|
2742
|
-
* The inspector module provides an API for interacting with the V8
|
2743
|
+
* The `node:inspector` module provides an API for interacting with the V8
|
2744
|
+
* inspector.
|
2743
2745
|
*/
|
2744
2746
|
declare module 'node:inspector' {
|
2745
2747
|
export * from 'inspector';
|
2746
2748
|
}
|
2749
|
+
|
2750
|
+
/**
|
2751
|
+
* The `node:inspector/promises` module provides an API for interacting with the V8
|
2752
|
+
* inspector.
|
2753
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/inspector/promises.js)
|
2754
|
+
* @since v19.0.0
|
2755
|
+
*/
|
2756
|
+
declare module 'inspector/promises' {
|
2757
|
+
import EventEmitter = require('node:events');
|
2758
|
+
import {
|
2759
|
+
open,
|
2760
|
+
close,
|
2761
|
+
url,
|
2762
|
+
waitForDebugger,
|
2763
|
+
console,
|
2764
|
+
InspectorNotification,
|
2765
|
+
Schema,
|
2766
|
+
Runtime,
|
2767
|
+
Debugger,
|
2768
|
+
Console,
|
2769
|
+
Profiler,
|
2770
|
+
HeapProfiler,
|
2771
|
+
NodeTracing,
|
2772
|
+
NodeWorker,
|
2773
|
+
NodeRuntime,
|
2774
|
+
} from 'inspector';
|
2775
|
+
|
2776
|
+
/**
|
2777
|
+
* The `inspector.Session` is used for dispatching messages to the V8 inspector
|
2778
|
+
* back-end and receiving message responses and notifications.
|
2779
|
+
* @since v19.0.0
|
2780
|
+
*/
|
2781
|
+
class Session extends EventEmitter {
|
2782
|
+
/**
|
2783
|
+
* Create a new instance of the `inspector.Session` class.
|
2784
|
+
* The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
|
2785
|
+
*/
|
2786
|
+
constructor();
|
2787
|
+
|
2788
|
+
/**
|
2789
|
+
* Connects a session to the inspector back-end.
|
2790
|
+
*/
|
2791
|
+
connect(): void;
|
2792
|
+
|
2793
|
+
/**
|
2794
|
+
* Connects a session to the inspector back-end.
|
2795
|
+
* An exception will be thrown if this API was not called on a Worker thread.
|
2796
|
+
*/
|
2797
|
+
connectToMainThread(): void;
|
2798
|
+
|
2799
|
+
/**
|
2800
|
+
* Immediately close the session. All pending message callbacks will be called with an error.
|
2801
|
+
* `session.connect()` will need to be called to be able to send messages again.
|
2802
|
+
* Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
|
2803
|
+
*/
|
2804
|
+
disconnect(): void;
|
2805
|
+
|
2806
|
+
/**
|
2807
|
+
* Posts a message to the inspector back-end.
|
2808
|
+
*
|
2809
|
+
* ```js
|
2810
|
+
* import { Session } from 'node:inspector/promises';
|
2811
|
+
* try {
|
2812
|
+
* const session = new Session();
|
2813
|
+
* session.connect();
|
2814
|
+
* const result = await session.post('Runtime.evaluate', { expression: '2 + 2' });
|
2815
|
+
* console.log(result);
|
2816
|
+
* } catch (error) {
|
2817
|
+
* console.error(error);
|
2818
|
+
* }
|
2819
|
+
* // Output: { result: { type: 'number', value: 4, description: '4' } }
|
2820
|
+
* ```
|
2821
|
+
*
|
2822
|
+
* The latest version of the V8 inspector protocol is published on the
|
2823
|
+
* [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/).
|
2824
|
+
*
|
2825
|
+
* Node.js inspector supports all the Chrome DevTools Protocol domains declared
|
2826
|
+
* by V8. Chrome DevTools Protocol domain provides an interface for interacting
|
2827
|
+
* with one of the runtime agents used to inspect the application state and listen
|
2828
|
+
* to the run-time events.
|
2829
|
+
*/
|
2830
|
+
post(method: string, params?: object): Promise<void>;
|
2831
|
+
/**
|
2832
|
+
* Returns supported domains.
|
2833
|
+
*/
|
2834
|
+
post(method: 'Schema.getDomains'): Promise<Schema.GetDomainsReturnType>;
|
2835
|
+
/**
|
2836
|
+
* Evaluates expression on global object.
|
2837
|
+
*/
|
2838
|
+
post(method: 'Runtime.evaluate', params?: Runtime.EvaluateParameterType): Promise<Runtime.EvaluateReturnType>;
|
2839
|
+
/**
|
2840
|
+
* Add handler to promise with given promise object id.
|
2841
|
+
*/
|
2842
|
+
post(method: 'Runtime.awaitPromise', params?: Runtime.AwaitPromiseParameterType): Promise<Runtime.AwaitPromiseReturnType>;
|
2843
|
+
/**
|
2844
|
+
* Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
|
2845
|
+
*/
|
2846
|
+
post(method: 'Runtime.callFunctionOn', params?: Runtime.CallFunctionOnParameterType): Promise<Runtime.CallFunctionOnReturnType>;
|
2847
|
+
/**
|
2848
|
+
* Returns properties of a given object. Object group of the result is inherited from the target object.
|
2849
|
+
*/
|
2850
|
+
post(method: 'Runtime.getProperties', params?: Runtime.GetPropertiesParameterType): Promise<Runtime.GetPropertiesReturnType>;
|
2851
|
+
/**
|
2852
|
+
* Releases remote object with given id.
|
2853
|
+
*/
|
2854
|
+
post(method: 'Runtime.releaseObject', params?: Runtime.ReleaseObjectParameterType): Promise<void>;
|
2855
|
+
/**
|
2856
|
+
* Releases all remote objects that belong to a given group.
|
2857
|
+
*/
|
2858
|
+
post(method: 'Runtime.releaseObjectGroup', params?: Runtime.ReleaseObjectGroupParameterType): Promise<void>;
|
2859
|
+
/**
|
2860
|
+
* Tells inspected instance to run if it was waiting for debugger to attach.
|
2861
|
+
*/
|
2862
|
+
post(method: 'Runtime.runIfWaitingForDebugger'): Promise<void>;
|
2863
|
+
/**
|
2864
|
+
* 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.
|
2865
|
+
*/
|
2866
|
+
post(method: 'Runtime.enable'): Promise<void>;
|
2867
|
+
/**
|
2868
|
+
* Disables reporting of execution contexts creation.
|
2869
|
+
*/
|
2870
|
+
post(method: 'Runtime.disable'): Promise<void>;
|
2871
|
+
/**
|
2872
|
+
* Discards collected exceptions and console API calls.
|
2873
|
+
*/
|
2874
|
+
post(method: 'Runtime.discardConsoleEntries'): Promise<void>;
|
2875
|
+
/**
|
2876
|
+
* @experimental
|
2877
|
+
*/
|
2878
|
+
post(method: 'Runtime.setCustomObjectFormatterEnabled', params?: Runtime.SetCustomObjectFormatterEnabledParameterType): Promise<void>;
|
2879
|
+
/**
|
2880
|
+
* Compiles expression.
|
2881
|
+
*/
|
2882
|
+
post(method: 'Runtime.compileScript', params?: Runtime.CompileScriptParameterType): Promise<Runtime.CompileScriptReturnType>;
|
2883
|
+
/**
|
2884
|
+
* Runs script with given id in a given context.
|
2885
|
+
*/
|
2886
|
+
post(method: 'Runtime.runScript', params?: Runtime.RunScriptParameterType): Promise<Runtime.RunScriptReturnType>;
|
2887
|
+
post(method: 'Runtime.queryObjects', params?: Runtime.QueryObjectsParameterType): Promise<Runtime.QueryObjectsReturnType>;
|
2888
|
+
/**
|
2889
|
+
* Returns all let, const and class variables from global scope.
|
2890
|
+
*/
|
2891
|
+
post(method: 'Runtime.globalLexicalScopeNames', params?: Runtime.GlobalLexicalScopeNamesParameterType): Promise<Runtime.GlobalLexicalScopeNamesReturnType>;
|
2892
|
+
/**
|
2893
|
+
* Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
|
2894
|
+
*/
|
2895
|
+
post(method: 'Debugger.enable'): Promise<Debugger.EnableReturnType>;
|
2896
|
+
/**
|
2897
|
+
* Disables debugger for given page.
|
2898
|
+
*/
|
2899
|
+
post(method: 'Debugger.disable'): Promise<void>;
|
2900
|
+
/**
|
2901
|
+
* Activates / deactivates all breakpoints on the page.
|
2902
|
+
*/
|
2903
|
+
post(method: 'Debugger.setBreakpointsActive', params?: Debugger.SetBreakpointsActiveParameterType): Promise<void>;
|
2904
|
+
/**
|
2905
|
+
* Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
|
2906
|
+
*/
|
2907
|
+
post(method: 'Debugger.setSkipAllPauses', params?: Debugger.SetSkipAllPausesParameterType): Promise<void>;
|
2908
|
+
/**
|
2909
|
+
* 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.
|
2910
|
+
*/
|
2911
|
+
post(method: 'Debugger.setBreakpointByUrl', params?: Debugger.SetBreakpointByUrlParameterType): Promise<Debugger.SetBreakpointByUrlReturnType>;
|
2912
|
+
/**
|
2913
|
+
* Sets JavaScript breakpoint at a given location.
|
2914
|
+
*/
|
2915
|
+
post(method: 'Debugger.setBreakpoint', params?: Debugger.SetBreakpointParameterType): Promise<Debugger.SetBreakpointReturnType>;
|
2916
|
+
/**
|
2917
|
+
* Removes JavaScript breakpoint.
|
2918
|
+
*/
|
2919
|
+
post(method: 'Debugger.removeBreakpoint', params?: Debugger.RemoveBreakpointParameterType): Promise<void>;
|
2920
|
+
/**
|
2921
|
+
* Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
|
2922
|
+
*/
|
2923
|
+
post(method: 'Debugger.getPossibleBreakpoints', params?: Debugger.GetPossibleBreakpointsParameterType): Promise<Debugger.GetPossibleBreakpointsReturnType>;
|
2924
|
+
/**
|
2925
|
+
* Continues execution until specific location is reached.
|
2926
|
+
*/
|
2927
|
+
post(method: 'Debugger.continueToLocation', params?: Debugger.ContinueToLocationParameterType): Promise<void>;
|
2928
|
+
/**
|
2929
|
+
* @experimental
|
2930
|
+
*/
|
2931
|
+
post(method: 'Debugger.pauseOnAsyncCall', params?: Debugger.PauseOnAsyncCallParameterType): Promise<void>;
|
2932
|
+
/**
|
2933
|
+
* Steps over the statement.
|
2934
|
+
*/
|
2935
|
+
post(method: 'Debugger.stepOver'): Promise<void>;
|
2936
|
+
/**
|
2937
|
+
* Steps into the function call.
|
2938
|
+
*/
|
2939
|
+
post(method: 'Debugger.stepInto', params?: Debugger.StepIntoParameterType): Promise<void>;
|
2940
|
+
/**
|
2941
|
+
* Steps out of the function call.
|
2942
|
+
*/
|
2943
|
+
post(method: 'Debugger.stepOut'): Promise<void>;
|
2944
|
+
/**
|
2945
|
+
* Stops on the next JavaScript statement.
|
2946
|
+
*/
|
2947
|
+
post(method: 'Debugger.pause'): Promise<void>;
|
2948
|
+
/**
|
2949
|
+
* 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.
|
2950
|
+
* @experimental
|
2951
|
+
*/
|
2952
|
+
post(method: 'Debugger.scheduleStepIntoAsync'): Promise<void>;
|
2953
|
+
/**
|
2954
|
+
* Resumes JavaScript execution.
|
2955
|
+
*/
|
2956
|
+
post(method: 'Debugger.resume'): Promise<void>;
|
2957
|
+
/**
|
2958
|
+
* Returns stack trace with given <code>stackTraceId</code>.
|
2959
|
+
* @experimental
|
2960
|
+
*/
|
2961
|
+
post(method: 'Debugger.getStackTrace', params?: Debugger.GetStackTraceParameterType): Promise<Debugger.GetStackTraceReturnType>;
|
2962
|
+
/**
|
2963
|
+
* Searches for given string in script content.
|
2964
|
+
*/
|
2965
|
+
post(method: 'Debugger.searchInContent', params?: Debugger.SearchInContentParameterType): Promise<Debugger.SearchInContentReturnType>;
|
2966
|
+
/**
|
2967
|
+
* Edits JavaScript source live.
|
2968
|
+
*/
|
2969
|
+
post(method: 'Debugger.setScriptSource', params?: Debugger.SetScriptSourceParameterType): Promise<Debugger.SetScriptSourceReturnType>;
|
2970
|
+
/**
|
2971
|
+
* Restarts particular call frame from the beginning.
|
2972
|
+
*/
|
2973
|
+
post(method: 'Debugger.restartFrame', params?: Debugger.RestartFrameParameterType): Promise<Debugger.RestartFrameReturnType>;
|
2974
|
+
/**
|
2975
|
+
* Returns source for the script with given id.
|
2976
|
+
*/
|
2977
|
+
post(method: 'Debugger.getScriptSource', params?: Debugger.GetScriptSourceParameterType): Promise<Debugger.GetScriptSourceReturnType>;
|
2978
|
+
/**
|
2979
|
+
* 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>.
|
2980
|
+
*/
|
2981
|
+
post(method: 'Debugger.setPauseOnExceptions', params?: Debugger.SetPauseOnExceptionsParameterType): Promise<void>;
|
2982
|
+
/**
|
2983
|
+
* Evaluates expression on a given call frame.
|
2984
|
+
*/
|
2985
|
+
post(method: 'Debugger.evaluateOnCallFrame', params?: Debugger.EvaluateOnCallFrameParameterType): Promise<Debugger.EvaluateOnCallFrameReturnType>;
|
2986
|
+
/**
|
2987
|
+
* Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
|
2988
|
+
*/
|
2989
|
+
post(method: 'Debugger.setVariableValue', params?: Debugger.SetVariableValueParameterType): Promise<void>;
|
2990
|
+
/**
|
2991
|
+
* Changes return value in top frame. Available only at return break position.
|
2992
|
+
* @experimental
|
2993
|
+
*/
|
2994
|
+
post(method: 'Debugger.setReturnValue', params?: Debugger.SetReturnValueParameterType): Promise<void>;
|
2995
|
+
/**
|
2996
|
+
* Enables or disables async call stacks tracking.
|
2997
|
+
*/
|
2998
|
+
post(method: 'Debugger.setAsyncCallStackDepth', params?: Debugger.SetAsyncCallStackDepthParameterType): Promise<void>;
|
2999
|
+
/**
|
3000
|
+
* 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.
|
3001
|
+
* @experimental
|
3002
|
+
*/
|
3003
|
+
post(method: 'Debugger.setBlackboxPatterns', params?: Debugger.SetBlackboxPatternsParameterType): Promise<void>;
|
3004
|
+
/**
|
3005
|
+
* 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.
|
3006
|
+
* @experimental
|
3007
|
+
*/
|
3008
|
+
post(method: 'Debugger.setBlackboxedRanges', params?: Debugger.SetBlackboxedRangesParameterType): Promise<void>;
|
3009
|
+
/**
|
3010
|
+
* Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.
|
3011
|
+
*/
|
3012
|
+
post(method: 'Console.enable'): Promise<void>;
|
3013
|
+
/**
|
3014
|
+
* Disables console domain, prevents further console messages from being reported to the client.
|
3015
|
+
*/
|
3016
|
+
post(method: 'Console.disable'): Promise<void>;
|
3017
|
+
/**
|
3018
|
+
* Does nothing.
|
3019
|
+
*/
|
3020
|
+
post(method: 'Console.clearMessages'): Promise<void>;
|
3021
|
+
post(method: 'Profiler.enable'): Promise<void>;
|
3022
|
+
post(method: 'Profiler.disable'): Promise<void>;
|
3023
|
+
/**
|
3024
|
+
* Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
|
3025
|
+
*/
|
3026
|
+
post(method: 'Profiler.setSamplingInterval', params?: Profiler.SetSamplingIntervalParameterType): Promise<void>;
|
3027
|
+
post(method: 'Profiler.start'): Promise<void>;
|
3028
|
+
post(method: 'Profiler.stop'): Promise<Profiler.StopReturnType>;
|
3029
|
+
/**
|
3030
|
+
* 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.
|
3031
|
+
*/
|
3032
|
+
post(method: 'Profiler.startPreciseCoverage', params?: Profiler.StartPreciseCoverageParameterType): Promise<void>;
|
3033
|
+
/**
|
3034
|
+
* Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
|
3035
|
+
*/
|
3036
|
+
post(method: 'Profiler.stopPreciseCoverage'): Promise<void>;
|
3037
|
+
/**
|
3038
|
+
* Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
|
3039
|
+
*/
|
3040
|
+
post(method: 'Profiler.takePreciseCoverage'): Promise<Profiler.TakePreciseCoverageReturnType>;
|
3041
|
+
/**
|
3042
|
+
* Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
|
3043
|
+
*/
|
3044
|
+
post(method: 'Profiler.getBestEffortCoverage'): Promise<Profiler.GetBestEffortCoverageReturnType>;
|
3045
|
+
post(method: 'HeapProfiler.enable'): Promise<void>;
|
3046
|
+
post(method: 'HeapProfiler.disable'): Promise<void>;
|
3047
|
+
post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType): Promise<void>;
|
3048
|
+
post(method: 'HeapProfiler.stopTrackingHeapObjects', params?: HeapProfiler.StopTrackingHeapObjectsParameterType): Promise<void>;
|
3049
|
+
post(method: 'HeapProfiler.takeHeapSnapshot', params?: HeapProfiler.TakeHeapSnapshotParameterType): Promise<void>;
|
3050
|
+
post(method: 'HeapProfiler.collectGarbage'): Promise<void>;
|
3051
|
+
post(method: 'HeapProfiler.getObjectByHeapObjectId', params?: HeapProfiler.GetObjectByHeapObjectIdParameterType): Promise<HeapProfiler.GetObjectByHeapObjectIdReturnType>;
|
3052
|
+
/**
|
3053
|
+
* Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
|
3054
|
+
*/
|
3055
|
+
post(method: 'HeapProfiler.addInspectedHeapObject', params?: HeapProfiler.AddInspectedHeapObjectParameterType): Promise<void>;
|
3056
|
+
post(method: 'HeapProfiler.getHeapObjectId', params?: HeapProfiler.GetHeapObjectIdParameterType): Promise<HeapProfiler.GetHeapObjectIdReturnType>;
|
3057
|
+
post(method: 'HeapProfiler.startSampling', params?: HeapProfiler.StartSamplingParameterType): Promise<void>;
|
3058
|
+
post(method: 'HeapProfiler.stopSampling'): Promise<HeapProfiler.StopSamplingReturnType>;
|
3059
|
+
post(method: 'HeapProfiler.getSamplingProfile'): Promise<HeapProfiler.GetSamplingProfileReturnType>;
|
3060
|
+
/**
|
3061
|
+
* Gets supported tracing categories.
|
3062
|
+
*/
|
3063
|
+
post(method: 'NodeTracing.getCategories'): Promise<NodeTracing.GetCategoriesReturnType>;
|
3064
|
+
/**
|
3065
|
+
* Start trace events collection.
|
3066
|
+
*/
|
3067
|
+
post(method: 'NodeTracing.start', params?: NodeTracing.StartParameterType): Promise<void>;
|
3068
|
+
/**
|
3069
|
+
* Stop trace events collection. Remaining collected events will be sent as a sequence of
|
3070
|
+
* dataCollected events followed by tracingComplete event.
|
3071
|
+
*/
|
3072
|
+
post(method: 'NodeTracing.stop'): Promise<void>;
|
3073
|
+
/**
|
3074
|
+
* Sends protocol message over session with given id.
|
3075
|
+
*/
|
3076
|
+
post(method: 'NodeWorker.sendMessageToWorker', params?: NodeWorker.SendMessageToWorkerParameterType): Promise<void>;
|
3077
|
+
/**
|
3078
|
+
* Instructs the inspector to attach to running workers. Will also attach to new workers
|
3079
|
+
* as they start
|
3080
|
+
*/
|
3081
|
+
post(method: 'NodeWorker.enable', params?: NodeWorker.EnableParameterType): Promise<void>;
|
3082
|
+
/**
|
3083
|
+
* Detaches from all running workers and disables attaching to new workers as they are started.
|
3084
|
+
*/
|
3085
|
+
post(method: 'NodeWorker.disable'): Promise<void>;
|
3086
|
+
/**
|
3087
|
+
* Detached from the worker with given sessionId.
|
3088
|
+
*/
|
3089
|
+
post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType): Promise<void>;
|
3090
|
+
/**
|
3091
|
+
* Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`.
|
3092
|
+
*/
|
3093
|
+
post(method: 'NodeRuntime.enable'): Promise<void>;
|
3094
|
+
/**
|
3095
|
+
* Disable NodeRuntime events
|
3096
|
+
*/
|
3097
|
+
post(method: 'NodeRuntime.disable'): Promise<void>;
|
3098
|
+
/**
|
3099
|
+
* Enable the `NodeRuntime.waitingForDisconnect`.
|
3100
|
+
*/
|
3101
|
+
post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType): Promise<void>;
|
3102
|
+
|
3103
|
+
addListener(event: string, listener: (...args: any[]) => void): this;
|
3104
|
+
/**
|
3105
|
+
* Emitted when any notification from the V8 Inspector is received.
|
3106
|
+
*/
|
3107
|
+
addListener(event: 'inspectorNotification', listener: (message: InspectorNotification<object>) => void): this;
|
3108
|
+
/**
|
3109
|
+
* Issued when new execution context is created.
|
3110
|
+
*/
|
3111
|
+
addListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
3112
|
+
/**
|
3113
|
+
* Issued when execution context is destroyed.
|
3114
|
+
*/
|
3115
|
+
addListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
3116
|
+
/**
|
3117
|
+
* Issued when all executionContexts were cleared in browser
|
3118
|
+
*/
|
3119
|
+
addListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
|
3120
|
+
/**
|
3121
|
+
* Issued when exception was thrown and unhandled.
|
3122
|
+
*/
|
3123
|
+
addListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
3124
|
+
/**
|
3125
|
+
* Issued when unhandled exception was revoked.
|
3126
|
+
*/
|
3127
|
+
addListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
3128
|
+
/**
|
3129
|
+
* Issued when console API was called.
|
3130
|
+
*/
|
3131
|
+
addListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
3132
|
+
/**
|
3133
|
+
* Issued when object should be inspected (for example, as a result of inspect() command line API call).
|
3134
|
+
*/
|
3135
|
+
addListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
3136
|
+
/**
|
3137
|
+
* Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
|
3138
|
+
*/
|
3139
|
+
addListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
3140
|
+
/**
|
3141
|
+
* Fired when virtual machine fails to parse the script.
|
3142
|
+
*/
|
3143
|
+
addListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
3144
|
+
/**
|
3145
|
+
* Fired when breakpoint is resolved to an actual script and location.
|
3146
|
+
*/
|
3147
|
+
addListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
3148
|
+
/**
|
3149
|
+
* Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
3150
|
+
*/
|
3151
|
+
addListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
3152
|
+
/**
|
3153
|
+
* Fired when the virtual machine resumed execution.
|
3154
|
+
*/
|
3155
|
+
addListener(event: 'Debugger.resumed', listener: () => void): this;
|
3156
|
+
/**
|
3157
|
+
* Issued when new console message is added.
|
3158
|
+
*/
|
3159
|
+
addListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
3160
|
+
/**
|
3161
|
+
* Sent when new profile recording is started using console.profile() call.
|
3162
|
+
*/
|
3163
|
+
addListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
3164
|
+
addListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
3165
|
+
addListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
3166
|
+
addListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
|
3167
|
+
addListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
3168
|
+
/**
|
3169
|
+
* 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.
|
3170
|
+
*/
|
3171
|
+
addListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
3172
|
+
/**
|
3173
|
+
* If heap objects tracking has been started then backend may send update for one or more fragments
|
3174
|
+
*/
|
3175
|
+
addListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
3176
|
+
/**
|
3177
|
+
* Contains an bucket of collected trace events.
|
3178
|
+
*/
|
3179
|
+
addListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
|
3180
|
+
/**
|
3181
|
+
* Signals that tracing is stopped and there is no trace buffers pending flush, all data were
|
3182
|
+
* delivered via dataCollected events.
|
3183
|
+
*/
|
3184
|
+
addListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
|
3185
|
+
/**
|
3186
|
+
* Issued when attached to a worker.
|
3187
|
+
*/
|
3188
|
+
addListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
|
3189
|
+
/**
|
3190
|
+
* Issued when detached from the worker.
|
3191
|
+
*/
|
3192
|
+
addListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
|
3193
|
+
/**
|
3194
|
+
* Notifies about a new protocol message received from the session
|
3195
|
+
* (session ID is provided in attachedToWorker notification).
|
3196
|
+
*/
|
3197
|
+
addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
|
3198
|
+
/**
|
3199
|
+
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3200
|
+
* enabled.
|
3201
|
+
* It is fired when the Node process finished all code execution and is
|
3202
|
+
* waiting for all frontends to disconnect.
|
3203
|
+
*/
|
3204
|
+
addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
|
3205
|
+
/**
|
3206
|
+
* This event is fired when the runtime is waiting for the debugger. For
|
3207
|
+
* example, when inspector.waitingForDebugger is called
|
3208
|
+
*/
|
3209
|
+
addListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
3210
|
+
emit(event: string | symbol, ...args: any[]): boolean;
|
3211
|
+
emit(event: 'inspectorNotification', message: InspectorNotification<object>): boolean;
|
3212
|
+
emit(event: 'Runtime.executionContextCreated', message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
|
3213
|
+
emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
|
3214
|
+
emit(event: 'Runtime.executionContextsCleared'): boolean;
|
3215
|
+
emit(event: 'Runtime.exceptionThrown', message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
|
3216
|
+
emit(event: 'Runtime.exceptionRevoked', message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
|
3217
|
+
emit(event: 'Runtime.consoleAPICalled', message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
|
3218
|
+
emit(event: 'Runtime.inspectRequested', message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
|
3219
|
+
emit(event: 'Debugger.scriptParsed', message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
|
3220
|
+
emit(event: 'Debugger.scriptFailedToParse', message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
|
3221
|
+
emit(event: 'Debugger.breakpointResolved', message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
|
3222
|
+
emit(event: 'Debugger.paused', message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
|
3223
|
+
emit(event: 'Debugger.resumed'): boolean;
|
3224
|
+
emit(event: 'Console.messageAdded', message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
|
3225
|
+
emit(event: 'Profiler.consoleProfileStarted', message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
|
3226
|
+
emit(event: 'Profiler.consoleProfileFinished', message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
|
3227
|
+
emit(event: 'HeapProfiler.addHeapSnapshotChunk', message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
|
3228
|
+
emit(event: 'HeapProfiler.resetProfiles'): boolean;
|
3229
|
+
emit(event: 'HeapProfiler.reportHeapSnapshotProgress', message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
|
3230
|
+
emit(event: 'HeapProfiler.lastSeenObjectId', message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
|
3231
|
+
emit(event: 'HeapProfiler.heapStatsUpdate', message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
|
3232
|
+
emit(event: 'NodeTracing.dataCollected', message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
|
3233
|
+
emit(event: 'NodeTracing.tracingComplete'): boolean;
|
3234
|
+
emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
|
3235
|
+
emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
|
3236
|
+
emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
|
3237
|
+
emit(event: 'NodeRuntime.waitingForDisconnect'): boolean;
|
3238
|
+
emit(event: 'NodeRuntime.waitingForDebugger'): boolean;
|
3239
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
3240
|
+
/**
|
3241
|
+
* Emitted when any notification from the V8 Inspector is received.
|
3242
|
+
*/
|
3243
|
+
on(event: 'inspectorNotification', listener: (message: InspectorNotification<object>) => void): this;
|
3244
|
+
/**
|
3245
|
+
* Issued when new execution context is created.
|
3246
|
+
*/
|
3247
|
+
on(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
3248
|
+
/**
|
3249
|
+
* Issued when execution context is destroyed.
|
3250
|
+
*/
|
3251
|
+
on(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
3252
|
+
/**
|
3253
|
+
* Issued when all executionContexts were cleared in browser
|
3254
|
+
*/
|
3255
|
+
on(event: 'Runtime.executionContextsCleared', listener: () => void): this;
|
3256
|
+
/**
|
3257
|
+
* Issued when exception was thrown and unhandled.
|
3258
|
+
*/
|
3259
|
+
on(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
3260
|
+
/**
|
3261
|
+
* Issued when unhandled exception was revoked.
|
3262
|
+
*/
|
3263
|
+
on(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
3264
|
+
/**
|
3265
|
+
* Issued when console API was called.
|
3266
|
+
*/
|
3267
|
+
on(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
3268
|
+
/**
|
3269
|
+
* Issued when object should be inspected (for example, as a result of inspect() command line API call).
|
3270
|
+
*/
|
3271
|
+
on(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
3272
|
+
/**
|
3273
|
+
* Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
|
3274
|
+
*/
|
3275
|
+
on(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
3276
|
+
/**
|
3277
|
+
* Fired when virtual machine fails to parse the script.
|
3278
|
+
*/
|
3279
|
+
on(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
3280
|
+
/**
|
3281
|
+
* Fired when breakpoint is resolved to an actual script and location.
|
3282
|
+
*/
|
3283
|
+
on(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
3284
|
+
/**
|
3285
|
+
* Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
3286
|
+
*/
|
3287
|
+
on(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
3288
|
+
/**
|
3289
|
+
* Fired when the virtual machine resumed execution.
|
3290
|
+
*/
|
3291
|
+
on(event: 'Debugger.resumed', listener: () => void): this;
|
3292
|
+
/**
|
3293
|
+
* Issued when new console message is added.
|
3294
|
+
*/
|
3295
|
+
on(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
3296
|
+
/**
|
3297
|
+
* Sent when new profile recording is started using console.profile() call.
|
3298
|
+
*/
|
3299
|
+
on(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
3300
|
+
on(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
3301
|
+
on(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
3302
|
+
on(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
|
3303
|
+
on(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
3304
|
+
/**
|
3305
|
+
* 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.
|
3306
|
+
*/
|
3307
|
+
on(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
3308
|
+
/**
|
3309
|
+
* If heap objects tracking has been started then backend may send update for one or more fragments
|
3310
|
+
*/
|
3311
|
+
on(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
3312
|
+
/**
|
3313
|
+
* Contains an bucket of collected trace events.
|
3314
|
+
*/
|
3315
|
+
on(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
|
3316
|
+
/**
|
3317
|
+
* Signals that tracing is stopped and there is no trace buffers pending flush, all data were
|
3318
|
+
* delivered via dataCollected events.
|
3319
|
+
*/
|
3320
|
+
on(event: 'NodeTracing.tracingComplete', listener: () => void): this;
|
3321
|
+
/**
|
3322
|
+
* Issued when attached to a worker.
|
3323
|
+
*/
|
3324
|
+
on(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
|
3325
|
+
/**
|
3326
|
+
* Issued when detached from the worker.
|
3327
|
+
*/
|
3328
|
+
on(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
|
3329
|
+
/**
|
3330
|
+
* Notifies about a new protocol message received from the session
|
3331
|
+
* (session ID is provided in attachedToWorker notification).
|
3332
|
+
*/
|
3333
|
+
on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
|
3334
|
+
/**
|
3335
|
+
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3336
|
+
* enabled.
|
3337
|
+
* It is fired when the Node process finished all code execution and is
|
3338
|
+
* waiting for all frontends to disconnect.
|
3339
|
+
*/
|
3340
|
+
on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
|
3341
|
+
/**
|
3342
|
+
* This event is fired when the runtime is waiting for the debugger. For
|
3343
|
+
* example, when inspector.waitingForDebugger is called
|
3344
|
+
*/
|
3345
|
+
on(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
3346
|
+
once(event: string, listener: (...args: any[]) => void): this;
|
3347
|
+
/**
|
3348
|
+
* Emitted when any notification from the V8 Inspector is received.
|
3349
|
+
*/
|
3350
|
+
once(event: 'inspectorNotification', listener: (message: InspectorNotification<object>) => void): this;
|
3351
|
+
/**
|
3352
|
+
* Issued when new execution context is created.
|
3353
|
+
*/
|
3354
|
+
once(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
3355
|
+
/**
|
3356
|
+
* Issued when execution context is destroyed.
|
3357
|
+
*/
|
3358
|
+
once(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
3359
|
+
/**
|
3360
|
+
* Issued when all executionContexts were cleared in browser
|
3361
|
+
*/
|
3362
|
+
once(event: 'Runtime.executionContextsCleared', listener: () => void): this;
|
3363
|
+
/**
|
3364
|
+
* Issued when exception was thrown and unhandled.
|
3365
|
+
*/
|
3366
|
+
once(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
3367
|
+
/**
|
3368
|
+
* Issued when unhandled exception was revoked.
|
3369
|
+
*/
|
3370
|
+
once(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
3371
|
+
/**
|
3372
|
+
* Issued when console API was called.
|
3373
|
+
*/
|
3374
|
+
once(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
3375
|
+
/**
|
3376
|
+
* Issued when object should be inspected (for example, as a result of inspect() command line API call).
|
3377
|
+
*/
|
3378
|
+
once(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
3379
|
+
/**
|
3380
|
+
* Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
|
3381
|
+
*/
|
3382
|
+
once(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
3383
|
+
/**
|
3384
|
+
* Fired when virtual machine fails to parse the script.
|
3385
|
+
*/
|
3386
|
+
once(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
3387
|
+
/**
|
3388
|
+
* Fired when breakpoint is resolved to an actual script and location.
|
3389
|
+
*/
|
3390
|
+
once(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
3391
|
+
/**
|
3392
|
+
* Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
3393
|
+
*/
|
3394
|
+
once(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
3395
|
+
/**
|
3396
|
+
* Fired when the virtual machine resumed execution.
|
3397
|
+
*/
|
3398
|
+
once(event: 'Debugger.resumed', listener: () => void): this;
|
3399
|
+
/**
|
3400
|
+
* Issued when new console message is added.
|
3401
|
+
*/
|
3402
|
+
once(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
3403
|
+
/**
|
3404
|
+
* Sent when new profile recording is started using console.profile() call.
|
3405
|
+
*/
|
3406
|
+
once(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
3407
|
+
once(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
3408
|
+
once(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
3409
|
+
once(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
|
3410
|
+
once(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
3411
|
+
/**
|
3412
|
+
* 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.
|
3413
|
+
*/
|
3414
|
+
once(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
3415
|
+
/**
|
3416
|
+
* If heap objects tracking has been started then backend may send update for one or more fragments
|
3417
|
+
*/
|
3418
|
+
once(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
3419
|
+
/**
|
3420
|
+
* Contains an bucket of collected trace events.
|
3421
|
+
*/
|
3422
|
+
once(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
|
3423
|
+
/**
|
3424
|
+
* Signals that tracing is stopped and there is no trace buffers pending flush, all data were
|
3425
|
+
* delivered via dataCollected events.
|
3426
|
+
*/
|
3427
|
+
once(event: 'NodeTracing.tracingComplete', listener: () => void): this;
|
3428
|
+
/**
|
3429
|
+
* Issued when attached to a worker.
|
3430
|
+
*/
|
3431
|
+
once(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
|
3432
|
+
/**
|
3433
|
+
* Issued when detached from the worker.
|
3434
|
+
*/
|
3435
|
+
once(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
|
3436
|
+
/**
|
3437
|
+
* Notifies about a new protocol message received from the session
|
3438
|
+
* (session ID is provided in attachedToWorker notification).
|
3439
|
+
*/
|
3440
|
+
once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
|
3441
|
+
/**
|
3442
|
+
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3443
|
+
* enabled.
|
3444
|
+
* It is fired when the Node process finished all code execution and is
|
3445
|
+
* waiting for all frontends to disconnect.
|
3446
|
+
*/
|
3447
|
+
once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
|
3448
|
+
/**
|
3449
|
+
* This event is fired when the runtime is waiting for the debugger. For
|
3450
|
+
* example, when inspector.waitingForDebugger is called
|
3451
|
+
*/
|
3452
|
+
once(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
3453
|
+
prependListener(event: string, listener: (...args: any[]) => void): this;
|
3454
|
+
/**
|
3455
|
+
* Emitted when any notification from the V8 Inspector is received.
|
3456
|
+
*/
|
3457
|
+
prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification<object>) => void): this;
|
3458
|
+
/**
|
3459
|
+
* Issued when new execution context is created.
|
3460
|
+
*/
|
3461
|
+
prependListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
3462
|
+
/**
|
3463
|
+
* Issued when execution context is destroyed.
|
3464
|
+
*/
|
3465
|
+
prependListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
3466
|
+
/**
|
3467
|
+
* Issued when all executionContexts were cleared in browser
|
3468
|
+
*/
|
3469
|
+
prependListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
|
3470
|
+
/**
|
3471
|
+
* Issued when exception was thrown and unhandled.
|
3472
|
+
*/
|
3473
|
+
prependListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
3474
|
+
/**
|
3475
|
+
* Issued when unhandled exception was revoked.
|
3476
|
+
*/
|
3477
|
+
prependListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
3478
|
+
/**
|
3479
|
+
* Issued when console API was called.
|
3480
|
+
*/
|
3481
|
+
prependListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
3482
|
+
/**
|
3483
|
+
* Issued when object should be inspected (for example, as a result of inspect() command line API call).
|
3484
|
+
*/
|
3485
|
+
prependListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
3486
|
+
/**
|
3487
|
+
* Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
|
3488
|
+
*/
|
3489
|
+
prependListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
3490
|
+
/**
|
3491
|
+
* Fired when virtual machine fails to parse the script.
|
3492
|
+
*/
|
3493
|
+
prependListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
3494
|
+
/**
|
3495
|
+
* Fired when breakpoint is resolved to an actual script and location.
|
3496
|
+
*/
|
3497
|
+
prependListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
3498
|
+
/**
|
3499
|
+
* Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
3500
|
+
*/
|
3501
|
+
prependListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
3502
|
+
/**
|
3503
|
+
* Fired when the virtual machine resumed execution.
|
3504
|
+
*/
|
3505
|
+
prependListener(event: 'Debugger.resumed', listener: () => void): this;
|
3506
|
+
/**
|
3507
|
+
* Issued when new console message is added.
|
3508
|
+
*/
|
3509
|
+
prependListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
3510
|
+
/**
|
3511
|
+
* Sent when new profile recording is started using console.profile() call.
|
3512
|
+
*/
|
3513
|
+
prependListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
3514
|
+
prependListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
3515
|
+
prependListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
3516
|
+
prependListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
|
3517
|
+
prependListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
3518
|
+
/**
|
3519
|
+
* 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.
|
3520
|
+
*/
|
3521
|
+
prependListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
3522
|
+
/**
|
3523
|
+
* If heap objects tracking has been started then backend may send update for one or more fragments
|
3524
|
+
*/
|
3525
|
+
prependListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
3526
|
+
/**
|
3527
|
+
* Contains an bucket of collected trace events.
|
3528
|
+
*/
|
3529
|
+
prependListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
|
3530
|
+
/**
|
3531
|
+
* Signals that tracing is stopped and there is no trace buffers pending flush, all data were
|
3532
|
+
* delivered via dataCollected events.
|
3533
|
+
*/
|
3534
|
+
prependListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
|
3535
|
+
/**
|
3536
|
+
* Issued when attached to a worker.
|
3537
|
+
*/
|
3538
|
+
prependListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
|
3539
|
+
/**
|
3540
|
+
* Issued when detached from the worker.
|
3541
|
+
*/
|
3542
|
+
prependListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
|
3543
|
+
/**
|
3544
|
+
* Notifies about a new protocol message received from the session
|
3545
|
+
* (session ID is provided in attachedToWorker notification).
|
3546
|
+
*/
|
3547
|
+
prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
|
3548
|
+
/**
|
3549
|
+
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3550
|
+
* enabled.
|
3551
|
+
* It is fired when the Node process finished all code execution and is
|
3552
|
+
* waiting for all frontends to disconnect.
|
3553
|
+
*/
|
3554
|
+
prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
|
3555
|
+
/**
|
3556
|
+
* This event is fired when the runtime is waiting for the debugger. For
|
3557
|
+
* example, when inspector.waitingForDebugger is called
|
3558
|
+
*/
|
3559
|
+
prependListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
3560
|
+
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
3561
|
+
/**
|
3562
|
+
* Emitted when any notification from the V8 Inspector is received.
|
3563
|
+
*/
|
3564
|
+
prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification<object>) => void): this;
|
3565
|
+
/**
|
3566
|
+
* Issued when new execution context is created.
|
3567
|
+
*/
|
3568
|
+
prependOnceListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
|
3569
|
+
/**
|
3570
|
+
* Issued when execution context is destroyed.
|
3571
|
+
*/
|
3572
|
+
prependOnceListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
|
3573
|
+
/**
|
3574
|
+
* Issued when all executionContexts were cleared in browser
|
3575
|
+
*/
|
3576
|
+
prependOnceListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
|
3577
|
+
/**
|
3578
|
+
* Issued when exception was thrown and unhandled.
|
3579
|
+
*/
|
3580
|
+
prependOnceListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
|
3581
|
+
/**
|
3582
|
+
* Issued when unhandled exception was revoked.
|
3583
|
+
*/
|
3584
|
+
prependOnceListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
|
3585
|
+
/**
|
3586
|
+
* Issued when console API was called.
|
3587
|
+
*/
|
3588
|
+
prependOnceListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
|
3589
|
+
/**
|
3590
|
+
* Issued when object should be inspected (for example, as a result of inspect() command line API call).
|
3591
|
+
*/
|
3592
|
+
prependOnceListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
|
3593
|
+
/**
|
3594
|
+
* Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
|
3595
|
+
*/
|
3596
|
+
prependOnceListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
|
3597
|
+
/**
|
3598
|
+
* Fired when virtual machine fails to parse the script.
|
3599
|
+
*/
|
3600
|
+
prependOnceListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
|
3601
|
+
/**
|
3602
|
+
* Fired when breakpoint is resolved to an actual script and location.
|
3603
|
+
*/
|
3604
|
+
prependOnceListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
|
3605
|
+
/**
|
3606
|
+
* Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
3607
|
+
*/
|
3608
|
+
prependOnceListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
|
3609
|
+
/**
|
3610
|
+
* Fired when the virtual machine resumed execution.
|
3611
|
+
*/
|
3612
|
+
prependOnceListener(event: 'Debugger.resumed', listener: () => void): this;
|
3613
|
+
/**
|
3614
|
+
* Issued when new console message is added.
|
3615
|
+
*/
|
3616
|
+
prependOnceListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
|
3617
|
+
/**
|
3618
|
+
* Sent when new profile recording is started using console.profile() call.
|
3619
|
+
*/
|
3620
|
+
prependOnceListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
|
3621
|
+
prependOnceListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
|
3622
|
+
prependOnceListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
|
3623
|
+
prependOnceListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
|
3624
|
+
prependOnceListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
|
3625
|
+
/**
|
3626
|
+
* 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.
|
3627
|
+
*/
|
3628
|
+
prependOnceListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
|
3629
|
+
/**
|
3630
|
+
* If heap objects tracking has been started then backend may send update for one or more fragments
|
3631
|
+
*/
|
3632
|
+
prependOnceListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
|
3633
|
+
/**
|
3634
|
+
* Contains an bucket of collected trace events.
|
3635
|
+
*/
|
3636
|
+
prependOnceListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
|
3637
|
+
/**
|
3638
|
+
* Signals that tracing is stopped and there is no trace buffers pending flush, all data were
|
3639
|
+
* delivered via dataCollected events.
|
3640
|
+
*/
|
3641
|
+
prependOnceListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
|
3642
|
+
/**
|
3643
|
+
* Issued when attached to a worker.
|
3644
|
+
*/
|
3645
|
+
prependOnceListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
|
3646
|
+
/**
|
3647
|
+
* Issued when detached from the worker.
|
3648
|
+
*/
|
3649
|
+
prependOnceListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
|
3650
|
+
/**
|
3651
|
+
* Notifies about a new protocol message received from the session
|
3652
|
+
* (session ID is provided in attachedToWorker notification).
|
3653
|
+
*/
|
3654
|
+
prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
|
3655
|
+
/**
|
3656
|
+
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3657
|
+
* enabled.
|
3658
|
+
* It is fired when the Node process finished all code execution and is
|
3659
|
+
* waiting for all frontends to disconnect.
|
3660
|
+
*/
|
3661
|
+
prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
|
3662
|
+
/**
|
3663
|
+
* This event is fired when the runtime is waiting for the debugger. For
|
3664
|
+
* example, when inspector.waitingForDebugger is called
|
3665
|
+
*/
|
3666
|
+
prependOnceListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
3667
|
+
}
|
3668
|
+
|
3669
|
+
export {
|
3670
|
+
Session,
|
3671
|
+
open,
|
3672
|
+
close,
|
3673
|
+
url,
|
3674
|
+
waitForDebugger,
|
3675
|
+
console,
|
3676
|
+
InspectorNotification,
|
3677
|
+
Schema,
|
3678
|
+
Runtime,
|
3679
|
+
Debugger,
|
3680
|
+
Console,
|
3681
|
+
Profiler,
|
3682
|
+
HeapProfiler,
|
3683
|
+
NodeTracing,
|
3684
|
+
NodeWorker,
|
3685
|
+
NodeRuntime,
|
3686
|
+
};
|
3687
|
+
}
|
3688
|
+
|
3689
|
+
/**
|
3690
|
+
* The `node:inspector/promises` module provides an API for interacting with the V8
|
3691
|
+
* inspector.
|
3692
|
+
* @since v19.0.0
|
3693
|
+
*/
|
3694
|
+
declare module 'node:inspector/promises' {
|
3695
|
+
export * from 'inspector/promises';
|
3696
|
+
}
|