cdk-common 2.0.221 → 2.0.224

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