OLD | NEW |
| (Empty) |
1 { | |
2 "version": { "major": "1", "minor": "1" }, | |
3 "domains": [{ | |
4 "domain": "Runtime", | |
5 "description": "Runtime domain exposes JavaScript runtime by means of re
mote evaluation and mirror objects. Evaluation results are returned as mirror ob
ject that expose object type, string representation and unique identifier that c
an be used for further object reference. Original objects are maintained in memo
ry unless they are either explicitly released or are released along with the oth
er objects in their object group.", | |
6 "types": [ | |
7 { | |
8 "id": "ScriptId", | |
9 "type": "string", | |
10 "description": "Unique script identifier." | |
11 }, | |
12 { | |
13 "id": "RemoteObjectId", | |
14 "type": "string", | |
15 "description": "Unique object identifier." | |
16 }, | |
17 { | |
18 "id": "RemoteObject", | |
19 "type": "object", | |
20 "description": "Mirror object referencing original JavaScript ob
ject.", | |
21 "properties": [ | |
22 { "name": "type", "type": "string", "enum": ["object", "func
tion", "undefined", "string", "number", "boolean", "symbol"], "description": "Ob
ject type." }, | |
23 { "name": "subtype", "type": "string", "optional": true, "en
um": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "gene
rator", "error"], "description": "Object subtype hint. Specified for <code>objec
t</code> type values only." }, | |
24 { "name": "className", "type": "string", "optional": true, "
description": "Object class (constructor) name. Specified for <code>object</code
> type values only." }, | |
25 { "name": "value", "type": "any", "optional": true, "descrip
tion": "Remote object value in case of primitive values or JSON values (if it wa
s requested), or description string if the value can not be JSON-stringified (li
ke NaN, Infinity, -Infinity, -0)." }, | |
26 { "name": "description", "type": "string", "optional": true,
"description": "String representation of the object." }, | |
27 { "name": "objectId", "$ref": "RemoteObjectId", "optional":
true, "description": "Unique object identifier (for non-primitive values)." }, | |
28 { "name": "preview", "$ref": "ObjectPreview", "optional": tr
ue, "description": "Preview containing abbreviated property values. Specified fo
r <code>object</code> type values only.", "hidden": true }, | |
29 { "name": "customPreview", "$ref": "CustomPreview", "optiona
l": true, "hidden": true} | |
30 ] | |
31 }, | |
32 { | |
33 "id": "CustomPreview", | |
34 "type": "object", | |
35 "hidden": true, | |
36 "properties": [ | |
37 { "name": "header", "type": "string"}, | |
38 { "name": "hasBody", "type": "boolean"}, | |
39 { "name": "formatterObjectId", "$ref": "RemoteObjectId"}, | |
40 { "name": "bindRemoteObjectFunctionId", "$ref": "RemoteObjec
tId" }, | |
41 { "name": "configObjectId", "$ref": "RemoteObjectId", "optio
nal": true } | |
42 ] | |
43 }, | |
44 { | |
45 "id": "ObjectPreview", | |
46 "type": "object", | |
47 "hidden": true, | |
48 "description": "Object containing abbreviated remote object valu
e.", | |
49 "properties": [ | |
50 { "name": "type", "type": "string", "enum": ["object", "func
tion", "undefined", "string", "number", "boolean", "symbol"], "description": "Ob
ject type." }, | |
51 { "name": "subtype", "type": "string", "optional": true, "en
um": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "gene
rator", "error"], "description": "Object subtype hint. Specified for <code>objec
t</code> type values only." }, | |
52 { "name": "description", "type": "string", "optional": true,
"description": "String representation of the object." }, | |
53 { "name": "overflow", "type": "boolean", "description": "Tru
e iff some of the properties or entries of the original object did not fit." }, | |
54 { "name": "properties", "type": "array", "items": { "$ref":
"PropertyPreview" }, "description": "List of the properties." }, | |
55 { "name": "entries", "type": "array", "items": { "$ref": "En
tryPreview" }, "optional": true, "description": "List of the entries. Specified
for <code>map</code> and <code>set</code> subtype values only." } | |
56 ] | |
57 }, | |
58 { | |
59 "id": "PropertyPreview", | |
60 "type": "object", | |
61 "hidden": true, | |
62 "properties": [ | |
63 { "name": "name", "type": "string", "description": "Property
name." }, | |
64 { "name": "type", "type": "string", "enum": ["object", "func
tion", "undefined", "string", "number", "boolean", "symbol", "accessor"], "descr
iption": "Object type. Accessor means that the property itself is an accessor pr
operty." }, | |
65 { "name": "value", "type": "string", "optional": true, "desc
ription": "User-friendly property value string." }, | |
66 { "name": "valuePreview", "$ref": "ObjectPreview", "optional
": true, "description": "Nested value preview." }, | |
67 { "name": "subtype", "type": "string", "optional": true, "en
um": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "gene
rator", "error"], "description": "Object subtype hint. Specified for <code>objec
t</code> type values only." } | |
68 ] | |
69 }, | |
70 { | |
71 "id": "EntryPreview", | |
72 "type": "object", | |
73 "hidden": true, | |
74 "properties": [ | |
75 { "name": "key", "$ref": "ObjectPreview", "optional": true,
"description": "Preview of the key. Specified for map-like collection entries."
}, | |
76 { "name": "value", "$ref": "ObjectPreview", "description": "
Preview of the value." } | |
77 ] | |
78 }, | |
79 { | |
80 "id": "PropertyDescriptor", | |
81 "type": "object", | |
82 "description": "Object property descriptor.", | |
83 "properties": [ | |
84 { "name": "name", "type": "string", "description": "Property
name or symbol description." }, | |
85 { "name": "value", "$ref": "RemoteObject", "optional": true,
"description": "The value associated with the property." }, | |
86 { "name": "writable", "type": "boolean", "optional": true, "
description": "True if the value associated with the property may be changed (da
ta descriptors only)." }, | |
87 { "name": "get", "$ref": "RemoteObject", "optional": true, "
description": "A function which serves as a getter for the property, or <code>un
defined</code> if there is no getter (accessor descriptors only)." }, | |
88 { "name": "set", "$ref": "RemoteObject", "optional": true, "
description": "A function which serves as a setter for the property, or <code>un
defined</code> if there is no setter (accessor descriptors only)." }, | |
89 { "name": "configurable", "type": "boolean", "description":
"True if the type of this property descriptor may be changed and if the property
may be deleted from the corresponding object." }, | |
90 { "name": "enumerable", "type": "boolean", "description": "T
rue if this property shows up during enumeration of the properties on the corres
ponding object." }, | |
91 { "name": "wasThrown", "type": "boolean", "optional": true,
"description": "True if the result was thrown during the evaluation." }, | |
92 { "name": "isOwn", "optional": true, "type": "boolean", "des
cription": "True if the property is owned for the object.", "hidden": true }, | |
93 { "name": "symbol", "$ref": "RemoteObject", "optional": true
, "description": "Property symbol object, if the property is of the <code>symbol
</code> type.", "hidden": true } | |
94 ] | |
95 }, | |
96 { | |
97 "id": "InternalPropertyDescriptor", | |
98 "type": "object", | |
99 "description": "Object internal property descriptor. This proper
ty isn't normally visible in JavaScript code.", | |
100 "properties": [ | |
101 { "name": "name", "type": "string", "description": "Conventi
onal property name." }, | |
102 { "name": "value", "$ref": "RemoteObject", "optional": true,
"description": "The value associated with the property." } | |
103 ], | |
104 "hidden": true | |
105 }, | |
106 { | |
107 "id": "CallArgument", | |
108 "type": "object", | |
109 "description": "Represents function call argument. Either remote
object id <code>objectId</code> or primitive <code>value</code> or neither of (
for undefined) them should be specified.", | |
110 "properties": [ | |
111 { "name": "value", "type": "any", "optional": true, "descrip
tion": "Primitive value, or description string if the value can not be JSON-stri
ngified (like NaN, Infinity, -Infinity, -0)." }, | |
112 { "name": "objectId", "$ref": "RemoteObjectId", "optional":
true, "description": "Remote object handle." }, | |
113 { "name": "type", "optional": true, "hidden": true, "type":
"string", "enum": ["object", "function", "undefined", "string", "number", "boole
an", "symbol"], "description": "Object type." } | |
114 ] | |
115 }, | |
116 { | |
117 "id": "ExecutionContextId", | |
118 "type": "integer", | |
119 "description": "Id of an execution context." | |
120 }, | |
121 { | |
122 "id": "ExecutionContextDescription", | |
123 "type": "object", | |
124 "description": "Description of an isolated world.", | |
125 "properties": [ | |
126 { "name": "id", "$ref": "ExecutionContextId", "description":
"Unique id of the execution context. It can be used to specify in which executi
on context script evaluation should be performed." }, | |
127 { "name": "isDefault", "type": "boolean", "description": "Wh
ether context is the default page context (as opposite to e.g. context of conten
t script).", "hidden": true }, | |
128 { "name": "origin", "type": "string", "description": "Execut
ion context origin.", "hidden": true}, | |
129 { "name": "name", "type": "string", "description": "Human re
adable name describing given context.", "hidden": true}, | |
130 { "name": "frameId", "type": "string", "description": "Id of
the owning frame. May be an empty string if the context is not associated with
a frame." } | |
131 ] | |
132 }, | |
133 { | |
134 "id": "ExceptionDetails", | |
135 "type": "object", | |
136 "hidden": true, | |
137 "description": "Detailed information about exception (or error)
that was thrown during script compilation or execution.", | |
138 "properties": [ | |
139 { "name": "text", "type": "string", "description": "Exceptio
n text." }, | |
140 { "name": "scriptId", "$ref": "ScriptId", "description": "Sc
ript ID of the exception location." }, | |
141 { "name": "lineNumber", "type": "integer", "description": "L
ine number of the exception location (0-based)." }, | |
142 { "name": "columnNumber", "type": "integer", "description":
"Column number of the exception location (0-based)." }, | |
143 { "name": "url", "type": "string", "optional": true, "descri
ption": "URL of the exception location, to be used when the script was not repor
ted." }, | |
144 { "name": "stackTrace", "$ref": "StackTrace", "optional": tr
ue, "description": "JavaScript stack trace if available." } | |
145 ] | |
146 }, | |
147 { | |
148 "id": "Timestamp", | |
149 "type": "number", | |
150 "description": "Number of milliseconds since epoch.", | |
151 "hidden": true | |
152 }, | |
153 { | |
154 "id": "CallFrame", | |
155 "type": "object", | |
156 "description": "Stack entry for runtime errors and assertions.", | |
157 "properties": [ | |
158 { "name": "functionName", "type": "string", "description": "
JavaScript function name." }, | |
159 { "name": "scriptId", "$ref": "ScriptId", "description": "Ja
vaScript script id." }, | |
160 { "name": "url", "type": "string", "description": "JavaScrip
t script name or url." }, | |
161 { "name": "lineNumber", "type": "integer", "description": "J
avaScript script line number (0-based)." }, | |
162 { "name": "columnNumber", "type": "integer", "description":
"JavaScript script column number (0-based)." } | |
163 ] | |
164 }, | |
165 { | |
166 "id": "StackTrace", | |
167 "type": "object", | |
168 "description": "Call frames for assertions or error messages.", | |
169 "properties": [ | |
170 { "name": "description", "type": "string", "optional": true,
"description": "String label of this stack trace. For async traces this may be
a name of the function that initiated the async call." }, | |
171 { "name": "callFrames", "type": "array", "items": { "$ref":
"CallFrame" }, "description": "JavaScript function name." }, | |
172 { "name": "parent", "$ref": "StackTrace", "optional": true,
"hidden": true, "description": "Asynchronous JavaScript stack trace that precede
d this stack, if available." } | |
173 ] | |
174 } | |
175 ], | |
176 "commands": [ | |
177 { | |
178 "name": "evaluate", | |
179 "parameters": [ | |
180 { "name": "expression", "type": "string", "description": "Ex
pression to evaluate." }, | |
181 { "name": "objectGroup", "type": "string", "optional": true,
"description": "Symbolic group name that can be used to release multiple object
s." }, | |
182 { "name": "includeCommandLineAPI", "type": "boolean", "optio
nal": true, "description": "Determines whether Command Line API should be availa
ble during the evaluation.", "hidden": true }, | |
183 { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "b
oolean", "optional": true, "description": "Specifies whether evaluation should s
top on exceptions and mute console. Overrides setPauseOnException state.", "hidd
en": true }, | |
184 { "name": "contextId", "$ref": "ExecutionContextId", "option
al": true, "description": "Specifies in which isolated context to perform evalua
tion. Each content script lives in an isolated context and this parameter may be
used to specify one of those contexts. If the parameter is omitted or 0 the eva
luation will be performed in the context of the inspected page." }, | |
185 { "name": "returnByValue", "type": "boolean", "optional": tr
ue, "description": "Whether the result is expected to be a JSON object that shou
ld be sent by value." }, | |
186 { "name": "generatePreview", "type": "boolean", "optional":
true, "hidden": true, "description": "Whether preview should be generated for th
e result." }, | |
187 { "name": "userGesture", "type": "boolean", "optional": true
, "hidden": true, "description": "Whether execution should be treated as initiat
ed by user in the UI." } | |
188 ], | |
189 "returns": [ | |
190 { "name": "result", "$ref": "RemoteObject", "description": "
Evaluation result." }, | |
191 { "name": "wasThrown", "type": "boolean", "optional": true,
"description": "True if the result was thrown during the evaluation." }, | |
192 { "name": "exceptionDetails", "$ref": "ExceptionDetails", "o
ptional": true, "hidden": true, "description": "Exception details."} | |
193 ], | |
194 "description": "Evaluates expression on global object." | |
195 }, | |
196 { | |
197 "name": "callFunctionOn", | |
198 "parameters": [ | |
199 { "name": "objectId", "$ref": "RemoteObjectId", "description
": "Identifier of the object to call function on." }, | |
200 { "name": "functionDeclaration", "type": "string", "descript
ion": "Declaration of the function to call." }, | |
201 { "name": "arguments", "type": "array", "items": { "$ref": "
CallArgument", "description": "Call argument." }, "optional": true, "description
": "Call arguments. All call arguments must belong to the same JavaScript world
as the target object." }, | |
202 { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "b
oolean", "optional": true, "description": "Specifies whether function call shoul
d stop on exceptions and mute console. Overrides setPauseOnException state.", "h
idden": true }, | |
203 { "name": "returnByValue", "type": "boolean", "optional": tr
ue, "description": "Whether the result is expected to be a JSON object which sho
uld be sent by value." }, | |
204 { "name": "generatePreview", "type": "boolean", "optional":
true, "hidden": true, "description": "Whether preview should be generated for th
e result." }, | |
205 { "name": "userGesture", "type": "boolean", "optional": true
, "hidden": true, "description": "Whether execution should be treated as initiat
ed by user in the UI." } | |
206 ], | |
207 "returns": [ | |
208 { "name": "result", "$ref": "RemoteObject", "description": "
Call result." }, | |
209 { "name": "wasThrown", "type": "boolean", "optional": true,
"description": "True if the result was thrown during the evaluation." } | |
210 ], | |
211 "description": "Calls function with given declaration on the giv
en object. Object group of the result is inherited from the target object." | |
212 }, | |
213 { | |
214 "name": "getProperties", | |
215 "parameters": [ | |
216 { "name": "objectId", "$ref": "RemoteObjectId", "description
": "Identifier of the object to return properties for." }, | |
217 { "name": "ownProperties", "optional": true, "type": "boolea
n", "description": "If true, returns properties belonging only to the element it
self, not to its prototype chain." }, | |
218 { "name": "accessorPropertiesOnly", "optional": true, "type"
: "boolean", "description": "If true, returns accessor properties (with getter/s
etter) only; internal properties are not returned either.", "hidden": true }, | |
219 { "name": "generatePreview", "type": "boolean", "optional":
true, "hidden": true, "description": "Whether preview should be generated for th
e results." } | |
220 ], | |
221 "returns": [ | |
222 { "name": "result", "type": "array", "items": { "$ref": "Pro
pertyDescriptor" }, "description": "Object properties." }, | |
223 { "name": "internalProperties", "optional": true, "type": "a
rray", "items": { "$ref": "InternalPropertyDescriptor" }, "description": "Intern
al object properties (only of the element itself).", "hidden": true }, | |
224 { "name": "exceptionDetails", "$ref": "ExceptionDetails", "o
ptional": true, "hidden": true, "description": "Exception details."} | |
225 ], | |
226 "description": "Returns properties of a given object. Object gro
up of the result is inherited from the target object." | |
227 }, | |
228 { | |
229 "name": "releaseObject", | |
230 "parameters": [ | |
231 { "name": "objectId", "$ref": "RemoteObjectId", "description
": "Identifier of the object to release." } | |
232 ], | |
233 "description": "Releases remote object with given id." | |
234 }, | |
235 { | |
236 "name": "releaseObjectGroup", | |
237 "parameters": [ | |
238 { "name": "objectGroup", "type": "string", "description": "S
ymbolic object group name." } | |
239 ], | |
240 "description": "Releases all remote objects that belong to a giv
en group." | |
241 }, | |
242 { | |
243 "name": "run", | |
244 "hidden": true, | |
245 "description": "Tells inspected instance(worker or page) that it
can run in case it was started paused." | |
246 }, | |
247 { | |
248 "name": "enable", | |
249 "description": "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.
" | |
250 }, | |
251 { | |
252 "name": "disable", | |
253 "hidden": true, | |
254 "description": "Disables reporting of execution contexts creatio
n." | |
255 }, | |
256 { | |
257 "name": "discardConsoleEntries", | |
258 "hidden": true, | |
259 "description": "Discards collected exceptions and console API ca
lls." | |
260 }, | |
261 { | |
262 "name": "setCustomObjectFormatterEnabled", | |
263 "parameters": [ | |
264 { | |
265 "name": "enabled", | |
266 "type": "boolean" | |
267 } | |
268 ], | |
269 "hidden": true | |
270 }, | |
271 { | |
272 "name": "compileScript", | |
273 "hidden": true, | |
274 "parameters": [ | |
275 { "name": "expression", "type": "string", "description": "Ex
pression to compile." }, | |
276 { "name": "sourceURL", "type": "string", "description": "Sou
rce url to be set for the script." }, | |
277 { "name": "persistScript", "type": "boolean", "description":
"Specifies whether the compiled script should be persisted." }, | |
278 { "name": "executionContextId", "$ref": "ExecutionContextId"
, "description": "Specifies in which isolated context to perform script run. Eac
h content script lives in an isolated context and this parameter is used to spec
ify one of those contexts." } | |
279 ], | |
280 "returns": [ | |
281 { "name": "scriptId", "$ref": "ScriptId", "optional": true,
"description": "Id of the script." }, | |
282 { "name": "exceptionDetails", "$ref": "ExceptionDetails", "o
ptional": true, "description": "Exception details."} | |
283 ], | |
284 "description": "Compiles expression." | |
285 }, | |
286 { | |
287 "name": "runScript", | |
288 "hidden": true, | |
289 "parameters": [ | |
290 { "name": "scriptId", "$ref": "ScriptId", "description": "Id
of the script to run." }, | |
291 { "name": "executionContextId", "$ref": "ExecutionContextId"
, "description": "Specifies in which isolated context to perform script run. Eac
h content script lives in an isolated context and this parameter is used to spec
ify one of those contexts." }, | |
292 { "name": "objectGroup", "type": "string", "optional": true,
"description": "Symbolic group name that can be used to release multiple object
s." }, | |
293 { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "b
oolean", "optional": true, "description": "Specifies whether script run should s
top on exceptions and mute console. Overrides setPauseOnException state." }, | |
294 { "name": "includeCommandLineAPI", "type": "boolean", "optio
nal": true, "description": "Determines whether Command Line API should be availa
ble during the evaluation." } | |
295 ], | |
296 "returns": [ | |
297 { "name": "result", "$ref": "RemoteObject", "description": "
Run result." }, | |
298 { "name": "exceptionDetails", "$ref": "ExceptionDetails", "o
ptional": true, "description": "Exception details."} | |
299 ], | |
300 "description": "Runs script with given id in a given context." | |
301 } | |
302 ], | |
303 "events": [ | |
304 { | |
305 "name": "executionContextCreated", | |
306 "parameters": [ | |
307 { "name": "context", "$ref": "ExecutionContextDescription",
"description": "A newly created execution contex." } | |
308 ], | |
309 "description": "Issued when new execution context is created." | |
310 }, | |
311 { | |
312 "name": "executionContextDestroyed", | |
313 "parameters": [ | |
314 { "name": "executionContextId", "$ref": "ExecutionContextId"
, "description": "Id of the destroyed context" } | |
315 ], | |
316 "description": "Issued when execution context is destroyed." | |
317 }, | |
318 { | |
319 "name": "executionContextsCleared", | |
320 "description": "Issued when all executionContexts were cleared i
n browser" | |
321 }, | |
322 { | |
323 "name": "exceptionThrown", | |
324 "description": "Issued when exception was thrown and unhandled."
, | |
325 "parameters": [ | |
326 { "name": "exceptionId", "type": "integer", "description": "
Exception id." }, | |
327 { "name": "timestamp", "$ref": "Timestamp", "description": "
Timestamp of the exception." }, | |
328 { "name": "details", "$ref": "ExceptionDetails" }, | |
329 { "name": "exception", "$ref": "RemoteObject", "optional": t
rue, "description": "Exception object." }, | |
330 { "name": "executionContextId", "$ref": "ExecutionContextId"
, "optional": true, "description": "Identifier of the context where exception ha
ppened." } | |
331 ], | |
332 "hidden": true | |
333 }, | |
334 { | |
335 "name": "exceptionRevoked", | |
336 "description": "Issued when unhandled exception was revoked.", | |
337 "parameters": [ | |
338 { "name": "message", "type": "string", "description": "Messa
ge describing why exception was revoked." }, | |
339 { "name": "exceptionId", "type": "integer", "description": "
The id of revoked exception, as reported in <code>exceptionUnhandled</code>." } | |
340 ], | |
341 "hidden": true | |
342 }, | |
343 { | |
344 "name": "consoleAPICalled", | |
345 "description": "Issued when console API was called.", | |
346 "parameters": [ | |
347 { "name": "type", "type": "string", "enum": ["log", "debug",
"info", "error", "warning", "dir", "dirxml", "table", "trace", "clear", "startG
roup", "startGroupCollapsed", "endGroup", "assert", "profile", "profileEnd"], "d
escription": "Type of the call." }, | |
348 { "name": "args", "type": "array", "items": { "$ref": "Remot
eObject" }, "description": "Call arguments." }, | |
349 { "name": "executionContextId", "$ref": "ExecutionContextId"
, "description": "Identifier of the context where the call was made." }, | |
350 { "name": "timestamp", "$ref": "Timestamp", "description": "
Call timestamp." }, | |
351 { "name": "stackTrace", "$ref": "StackTrace", "optional": tr
ue, "description": "Stack trace captured when the call was made." } | |
352 ], | |
353 "hidden": true | |
354 }, | |
355 { | |
356 "name": "inspectRequested", | |
357 "parameters": [ | |
358 { "name": "object", "$ref": "RemoteObject" }, | |
359 { "name": "hints", "type": "object" } | |
360 ], | |
361 "hidden": true | |
362 } | |
363 ] | |
364 }, | |
365 { | |
366 "domain": "Debugger", | |
367 "description": "Debugger domain exposes JavaScript debugging capabilitie
s. It allows setting and removing breakpoints, stepping through execution, explo
ring stack traces, etc.", | |
368 "dependencies": ["Runtime"], | |
369 "types": [ | |
370 { | |
371 "id": "BreakpointId", | |
372 "type": "string", | |
373 "description": "Breakpoint identifier." | |
374 }, | |
375 { | |
376 "id": "CallFrameId", | |
377 "type": "string", | |
378 "description": "Call frame identifier." | |
379 }, | |
380 { | |
381 "id": "Location", | |
382 "type": "object", | |
383 "properties": [ | |
384 { "name": "scriptId", "$ref": "Runtime.ScriptId", "descripti
on": "Script identifier as reported in the <code>Debugger.scriptParsed</code>."
}, | |
385 { "name": "lineNumber", "type": "integer", "description": "L
ine number in the script (0-based)." }, | |
386 { "name": "columnNumber", "type": "integer", "optional": tru
e, "description": "Column number in the script (0-based)." } | |
387 ], | |
388 "description": "Location in the source code." | |
389 }, | |
390 { | |
391 "id": "ScriptPosition", | |
392 "hidden": true, | |
393 "type": "object", | |
394 "properties": [ | |
395 { "name": "lineNumber", "type": "integer" }, | |
396 { "name": "columnNumber", "type": "integer" } | |
397 ], | |
398 "description": "Location in the source code." | |
399 }, | |
400 { | |
401 "id": "CallFrame", | |
402 "type": "object", | |
403 "properties": [ | |
404 { "name": "callFrameId", "$ref": "CallFrameId", "description
": "Call frame identifier. This identifier is only valid while the virtual machi
ne is paused." }, | |
405 { "name": "functionName", "type": "string", "description": "
Name of the JavaScript function called on this call frame." }, | |
406 { "name": "functionLocation", "$ref": "Location", "optional"
: true, "hidden": true, "description": "Location in the source code." }, | |
407 { "name": "location", "$ref": "Location", "description": "Lo
cation in the source code." }, | |
408 { "name": "scopeChain", "type": "array", "items": { "$ref":
"Scope" }, "description": "Scope chain for this call frame." }, | |
409 { "name": "this", "$ref": "Runtime.RemoteObject", "descripti
on": "<code>this</code> object for this call frame." }, | |
410 { "name": "returnValue", "$ref": "Runtime.RemoteObject", "op
tional": true, "hidden": true, "description": "The value being returned, if the
function is at return point." } | |
411 ], | |
412 "description": "JavaScript call frame. Array of call frames form
the call stack." | |
413 }, | |
414 { | |
415 "id": "Scope", | |
416 "type": "object", | |
417 "properties": [ | |
418 { "name": "type", "type": "string", "enum": ["global", "loca
l", "with", "closure", "catch", "block", "script"], "description": "Scope type."
}, | |
419 { "name": "object", "$ref": "Runtime.RemoteObject", "descrip
tion": "Object representing the scope. For <code>global</code> and <code>with</c
ode> scopes it represents the actual object; for the rest of the scopes, it is a
rtificial transient object enumerating scope variables as its properties." }, | |
420 { "name": "name", "type": "string", "optional": true, "hidde
n": true }, | |
421 { "name": "startLocation", "$ref": "Location", "optional": t
rue, "hidden": true, "description": "Location in the source code where scope sta
rts" }, | |
422 { "name": "endLocation", "$ref": "Location", "optional": tru
e, "hidden": true, "description": "Location in the source code where scope ends"
} | |
423 ], | |
424 "description": "Scope description." | |
425 }, | |
426 { | |
427 "id": "SearchMatch", | |
428 "type": "object", | |
429 "description": "Search match for resource.", | |
430 "properties": [ | |
431 { "name": "lineNumber", "type": "number", "description": "Li
ne number in resource content." }, | |
432 { "name": "lineContent", "type": "string", "description": "L
ine with match content." } | |
433 ], | |
434 "hidden": true | |
435 } | |
436 ], | |
437 "commands": [ | |
438 { | |
439 "name": "enable", | |
440 "description": "Enables debugger for the given page. Clients sho
uld not assume that the debugging has been enabled until the result for this com
mand is received." | |
441 }, | |
442 { | |
443 "name": "disable", | |
444 "description": "Disables debugger for given page." | |
445 }, | |
446 { | |
447 "name": "setBreakpointsActive", | |
448 "parameters": [ | |
449 { "name": "active", "type": "boolean", "description": "New v
alue for breakpoints active state." } | |
450 ], | |
451 "description": "Activates / deactivates all breakpoints on the p
age." | |
452 }, | |
453 { | |
454 "name": "setSkipAllPauses", | |
455 "hidden": true, | |
456 "parameters": [ | |
457 { "name": "skipped", "type": "boolean", "description": "New
value for skip pauses state." } | |
458 ], | |
459 "description": "Makes page not interrupt on any pauses (breakpoi
nt, exception, dom exception etc)." | |
460 }, | |
461 { | |
462 "name": "setBreakpointByUrl", | |
463 "parameters": [ | |
464 { "name": "lineNumber", "type": "integer", "description": "L
ine number to set breakpoint at." }, | |
465 { "name": "url", "type": "string", "optional": true, "descri
ption": "URL of the resources to set breakpoint on." }, | |
466 { "name": "urlRegex", "type": "string", "optional": true, "d
escription": "Regex pattern for the URLs of the resources to set breakpoints on.
Either <code>url</code> or <code>urlRegex</code> must be specified." }, | |
467 { "name": "columnNumber", "type": "integer", "optional": tru
e, "description": "Offset in the line to set breakpoint at." }, | |
468 { "name": "condition", "type": "string", "optional": true, "
description": "Expression to use as a breakpoint condition. When specified, debu
gger will only stop on the breakpoint if this expression evaluates to true." } | |
469 ], | |
470 "returns": [ | |
471 { "name": "breakpointId", "$ref": "BreakpointId", "descripti
on": "Id of the created breakpoint for further reference." }, | |
472 { "name": "locations", "type": "array", "items": { "$ref": "
Location" }, "description": "List of the locations this breakpoint resolved into
upon addition." } | |
473 ], | |
474 "description": "Sets JavaScript breakpoint at given location spe
cified either by URL or URL regex. Once this command is issued, all existing par
sed scripts will have breakpoints resolved and returned in <code>locations</code
> property. Further matching script parsing will result in subsequent <code>brea
kpointResolved</code> events issued. This logical breakpoint will survive page r
eloads." | |
475 }, | |
476 { | |
477 "name": "setBreakpoint", | |
478 "parameters": [ | |
479 { "name": "location", "$ref": "Location", "description": "Lo
cation to set breakpoint in." }, | |
480 { "name": "condition", "type": "string", "optional": true, "
description": "Expression to use as a breakpoint condition. When specified, debu
gger will only stop on the breakpoint if this expression evaluates to true." } | |
481 ], | |
482 "returns": [ | |
483 { "name": "breakpointId", "$ref": "BreakpointId", "descripti
on": "Id of the created breakpoint for further reference." }, | |
484 { "name": "actualLocation", "$ref": "Location", "description
": "Location this breakpoint resolved into." } | |
485 ], | |
486 "description": "Sets JavaScript breakpoint at a given location." | |
487 }, | |
488 { | |
489 "name": "removeBreakpoint", | |
490 "parameters": [ | |
491 { "name": "breakpointId", "$ref": "BreakpointId" } | |
492 ], | |
493 "description": "Removes JavaScript breakpoint." | |
494 }, | |
495 { | |
496 "name": "continueToLocation", | |
497 "parameters": [ | |
498 { "name": "location", "$ref": "Location", "description": "Lo
cation to continue to." }, | |
499 { "name": "interstatementLocation", "type": "boolean", "opti
onal": true, "hidden": true, "description": "Allows breakpoints at the intemedia
te positions inside statements." } | |
500 ], | |
501 "description": "Continues execution until specific location is r
eached." | |
502 }, | |
503 { | |
504 "name": "stepOver", | |
505 "description": "Steps over the statement." | |
506 }, | |
507 { | |
508 "name": "stepInto", | |
509 "description": "Steps into the function call." | |
510 }, | |
511 { | |
512 "name": "stepOut", | |
513 "description": "Steps out of the function call." | |
514 }, | |
515 { | |
516 "name": "pause", | |
517 "description": "Stops on the next JavaScript statement." | |
518 }, | |
519 { | |
520 "name": "resume", | |
521 "description": "Resumes JavaScript execution." | |
522 }, | |
523 { | |
524 "name": "searchInContent", | |
525 "parameters": [ | |
526 { "name": "scriptId", "$ref": "Runtime.ScriptId", "descripti
on": "Id of the script to search in." }, | |
527 { "name": "query", "type": "string", "description": "String
to search for." }, | |
528 { "name": "caseSensitive", "type": "boolean", "optional": tr
ue, "description": "If true, search is case sensitive." }, | |
529 { "name": "isRegex", "type": "boolean", "optional": true, "d
escription": "If true, treats string parameter as regex." } | |
530 ], | |
531 "returns": [ | |
532 { "name": "result", "type": "array", "items": { "$ref": "Sea
rchMatch" }, "description": "List of search matches." } | |
533 ], | |
534 "description": "Searches for given string in script content." | |
535 }, | |
536 { | |
537 "name": "canSetScriptSource", | |
538 "returns": [ | |
539 { "name": "result", "type": "boolean", "description": "True
if <code>setScriptSource</code> is supported." } | |
540 ], | |
541 "description": "Always returns true." | |
542 }, | |
543 { | |
544 "name": "setScriptSource", | |
545 "parameters": [ | |
546 { "name": "scriptId", "$ref": "Runtime.ScriptId", "descripti
on": "Id of the script to edit." }, | |
547 { "name": "scriptSource", "type": "string", "description": "
New content of the script." }, | |
548 { "name": "preview", "type": "boolean", "optional": true, "d
escription": " If true the change will not actually be applied. Preview mode may
be used to get result description without actually modifying the code.", "hidde
n": true } | |
549 ], | |
550 "returns": [ | |
551 { "name": "callFrames", "type": "array", "optional": true, "
items": { "$ref": "CallFrame" }, "description": "New stack trace in case editing
has happened while VM was stopped." }, | |
552 { "name": "stackChanged", "type": "boolean", "optional": tru
e, "description": "Whether current call stack was modified after applying the c
hanges.", "hidden": true }, | |
553 { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "
optional": true, "description": "Async stack trace, if any.", "hidden": true }, | |
554 { "name": "compileError", "optional": true, "$ref": "Runtime
.ExceptionDetails", "description": "Error data if any." } | |
555 ], | |
556 "description": "Edits JavaScript source live." | |
557 }, | |
558 { | |
559 "name": "restartFrame", | |
560 "parameters": [ | |
561 { "name": "callFrameId", "$ref": "CallFrameId", "description
": "Call frame identifier to evaluate on." } | |
562 ], | |
563 "returns": [ | |
564 { "name": "callFrames", "type": "array", "items": { "$ref":
"CallFrame" }, "description": "New stack trace." }, | |
565 { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "
optional": true, "description": "Async stack trace, if any." } | |
566 ], | |
567 "hidden": true, | |
568 "description": "Restarts particular call frame from the beginnin
g." | |
569 }, | |
570 { | |
571 "name": "getScriptSource", | |
572 "parameters": [ | |
573 { "name": "scriptId", "$ref": "Runtime.ScriptId", "descripti
on": "Id of the script to get source for." } | |
574 ], | |
575 "returns": [ | |
576 { "name": "scriptSource", "type": "string", "description": "
Script source." } | |
577 ], | |
578 "description": "Returns source for the script with given id." | |
579 }, | |
580 { | |
581 "name": "setPauseOnExceptions", | |
582 "parameters": [ | |
583 { "name": "state", "type": "string", "enum": ["none", "uncau
ght", "all"], "description": "Pause on exceptions mode." } | |
584 ], | |
585 "description": "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>." | |
586 }, | |
587 { | |
588 "name": "evaluateOnCallFrame", | |
589 "parameters": [ | |
590 { "name": "callFrameId", "$ref": "CallFrameId", "description
": "Call frame identifier to evaluate on." }, | |
591 { "name": "expression", "type": "string", "description": "Ex
pression to evaluate." }, | |
592 { "name": "objectGroup", "type": "string", "optional": true,
"description": "String object group name to put result into (allows rapid relea
sing resulting object handles using <code>releaseObjectGroup</code>)." }, | |
593 { "name": "includeCommandLineAPI", "type": "boolean", "optio
nal": true, "description": "Specifies whether command line API should be availab
le to the evaluated expression, defaults to false.", "hidden": true }, | |
594 { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "b
oolean", "optional": true, "description": "Specifies whether evaluation should s
top on exceptions and mute console. Overrides setPauseOnException state.", "hidd
en": true }, | |
595 { "name": "returnByValue", "type": "boolean", "optional": tr
ue, "description": "Whether the result is expected to be a JSON object that shou
ld be sent by value." }, | |
596 { "name": "generatePreview", "type": "boolean", "optional":
true, "hidden": true, "description": "Whether preview should be generated for th
e result." } | |
597 ], | |
598 "returns": [ | |
599 { "name": "result", "$ref": "Runtime.RemoteObject", "descrip
tion": "Object wrapper for the evaluation result." }, | |
600 { "name": "wasThrown", "type": "boolean", "optional": true,
"description": "True if the result was thrown during the evaluation." }, | |
601 { "name": "exceptionDetails", "$ref": "Runtime.ExceptionDeta
ils", "optional": true, "hidden": true, "description": "Exception details."} | |
602 ], | |
603 "description": "Evaluates expression on a given call frame." | |
604 }, | |
605 { | |
606 "name": "setVariableValue", | |
607 "parameters": [ | |
608 { "name": "scopeNumber", "type": "integer", "description": "
0-based number of scope as was listed in scope chain. Only 'local', 'closure' an
d 'catch' scope types are allowed. Other scopes could be manipulated manually."
}, | |
609 { "name": "variableName", "type": "string", "description": "
Variable name." }, | |
610 { "name": "newValue", "$ref": "Runtime.CallArgument", "descr
iption": "New variable value." }, | |
611 { "name": "callFrameId", "$ref": "CallFrameId", "description
": "Id of callframe that holds variable." } | |
612 ], | |
613 "hidden": true, | |
614 "description": "Changes value of variable in a callframe. Object
-based scopes are not supported and must be mutated manually." | |
615 }, | |
616 { | |
617 "name": "getBacktrace", | |
618 "returns": [ | |
619 { "name": "callFrames", "type": "array", "items": { "$ref":
"CallFrame" }, "description": "Call stack the virtual machine stopped on." }, | |
620 { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "
optional": true, "description": "Async stack trace, if any." } | |
621 ], | |
622 "hidden": true, | |
623 "description": "Returns call stack including variables changed s
ince VM was paused. VM must be paused." | |
624 }, | |
625 { | |
626 "name": "setAsyncCallStackDepth", | |
627 "parameters": [ | |
628 { "name": "maxDepth", "type": "integer", "description": "Max
imum depth of async call stacks. Setting to <code>0</code> will effectively disa
ble collecting async call stacks (default)." } | |
629 ], | |
630 "hidden": true, | |
631 "description": "Enables or disables async call stacks tracking." | |
632 }, | |
633 { | |
634 "name": "setBlackboxPatterns", | |
635 "parameters": [ | |
636 { "name": "patterns", "type": "array", "items": { "type": "s
tring" }, "description": "Array of regexps that will be used to check script url
for blackbox state." } | |
637 ], | |
638 "hidden": true, | |
639 "description": "Replace previous blackbox patterns with passed o
nes. 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' se
veral times, finally resorting to 'step out' if unsuccessful." | |
640 }, | |
641 { | |
642 "name": "setBlackboxedRanges", | |
643 "parameters": [ | |
644 { "name": "scriptId", "$ref": "Runtime.ScriptId", "descripti
on": "Id of the script." }, | |
645 { "name": "positions", "type": "array", "items": { "$ref": "
ScriptPosition" } } | |
646 ], | |
647 "hidden": true, | |
648 "description": "Makes backend skip steps in the script in blackb
oxed ranges. VM will try leave blacklisted scripts by performing 'step in' sever
al times, finally resorting to 'step out' if unsuccessful. Positions array conta
ins positions where blackbox state is changed. First interval isn't blackboxed.
Array should be sorted." | |
649 } | |
650 ], | |
651 "events": [ | |
652 { | |
653 "name": "scriptParsed", | |
654 "parameters": [ | |
655 { "name": "scriptId", "$ref": "Runtime.ScriptId", "descripti
on": "Identifier of the script parsed." }, | |
656 { "name": "url", "type": "string", "description": "URL or na
me of the script parsed (if any)." }, | |
657 { "name": "startLine", "type": "integer", "description": "Li
ne offset of the script within the resource with given URL (for script tags)." }
, | |
658 { "name": "startColumn", "type": "integer", "description": "
Column offset of the script within the resource with given URL." }, | |
659 { "name": "endLine", "type": "integer", "description": "Last
line of the script." }, | |
660 { "name": "endColumn", "type": "integer", "description": "Le
ngth of the last line of the script." }, | |
661 { "name": "executionContextId", "$ref": "Runtime.ExecutionCo
ntextId", "description": "Specifies script creation context.", "hidden": true }, | |
662 { "name": "hash", "type": "string", "hidden": true, "descrip
tion": "Content hash of the script."}, | |
663 { "name": "isContentScript", "type": "boolean", "optional":
true, "description": "Determines whether this script is a user extension script.
" }, | |
664 { "name": "isInternalScript", "type": "boolean", "optional":
true, "description": "Determines whether this script is an internal script.", "
hidden": true }, | |
665 { "name": "isLiveEdit", "type": "boolean", "optional": true,
"description": "True, if this script is generated as a result of the live edit
operation.", "hidden": true }, | |
666 { "name": "sourceMapURL", "type": "string", "optional": true
, "description": "URL of source map associated with script (if any)." }, | |
667 { "name": "hasSourceURL", "type": "boolean", "optional": tru
e, "description": "True, if this script has sourceURL.", "hidden": true }, | |
668 { "name": "deprecatedCommentWasUsed", "type": "boolean", "op
tional": true, "hidden": true, "description": "True, if '//@ sourceURL' or '//@
sourceMappingURL' was used."} | |
669 ], | |
670 "description": "Fired when virtual machine parses script. This e
vent is also fired for all known and uncollected scripts upon enabling debugger.
" | |
671 }, | |
672 { | |
673 "name": "scriptFailedToParse", | |
674 "parameters": [ | |
675 { "name": "scriptId", "$ref": "Runtime.ScriptId", "descripti
on": "Identifier of the script parsed." }, | |
676 { "name": "url", "type": "string", "description": "URL or na
me of the script parsed (if any)." }, | |
677 { "name": "startLine", "type": "integer", "description": "Li
ne offset of the script within the resource with given URL (for script tags)." }
, | |
678 { "name": "startColumn", "type": "integer", "description": "
Column offset of the script within the resource with given URL." }, | |
679 { "name": "endLine", "type": "integer", "description": "Last
line of the script." }, | |
680 { "name": "endColumn", "type": "integer", "description": "Le
ngth of the last line of the script." }, | |
681 { "name": "executionContextId", "$ref": "Runtime.ExecutionCo
ntextId", "description": "Specifies script creation context.", "hidden": true }, | |
682 { "name": "hash", "type": "string", "hidden": true, "descrip
tion": "Content hash of the script."}, | |
683 { "name": "isContentScript", "type": "boolean", "optional":
true, "description": "Determines whether this script is a user extension script.
" }, | |
684 { "name": "isInternalScript", "type": "boolean", "optional":
true, "description": "Determines whether this script is an internal script.", "
hidden": true }, | |
685 { "name": "sourceMapURL", "type": "string", "optional": true
, "description": "URL of source map associated with script (if any)." }, | |
686 { "name": "hasSourceURL", "type": "boolean", "optional": tru
e, "description": "True, if this script has sourceURL.", "hidden": true }, | |
687 { "name": "deprecatedCommentWasUsed", "type": "boolean", "op
tional": true, "hidden": true, "description": "True, if '//@ sourceURL' or '//@
sourceMappingURL' was used."} | |
688 ], | |
689 "description": "Fired when virtual machine fails to parse the sc
ript." | |
690 }, | |
691 { | |
692 "name": "breakpointResolved", | |
693 "parameters": [ | |
694 { "name": "breakpointId", "$ref": "BreakpointId", "descripti
on": "Breakpoint unique identifier." }, | |
695 { "name": "location", "$ref": "Location", "description": "Ac
tual breakpoint location." } | |
696 ], | |
697 "description": "Fired when breakpoint is resolved to an actual s
cript and location." | |
698 }, | |
699 { | |
700 "name": "paused", | |
701 "parameters": [ | |
702 { "name": "callFrames", "type": "array", "items": { "$ref":
"CallFrame" }, "description": "Call stack the virtual machine stopped on." }, | |
703 { "name": "reason", "type": "string", "enum": [ "XHR", "DOM"
, "EventListener", "exception", "assert", "debugCommand", "promiseRejection", "o
ther" ], "description": "Pause reason." }, | |
704 { "name": "data", "type": "object", "optional": true, "descr
iption": "Object containing break-specific auxiliary properties." }, | |
705 { "name": "hitBreakpoints", "type": "array", "optional": tru
e, "items": { "type": "string" }, "description": "Hit breakpoints IDs", "hidden"
: true }, | |
706 { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "
optional": true, "description": "Async stack trace, if any.", "hidden": true } | |
707 ], | |
708 "description": "Fired when the virtual machine stopped on breakp
oint or exception or any other stop criteria." | |
709 }, | |
710 { | |
711 "name": "resumed", | |
712 "description": "Fired when the virtual machine resumed execution
." | |
713 } | |
714 ] | |
715 }, | |
716 { | |
717 "domain": "Console", | |
718 "description": "This domain is deprecated - use Runtime or Log instead."
, | |
719 "dependencies": ["Runtime"], | |
720 "deprecated": true, | |
721 "types": [ | |
722 { | |
723 "id": "ConsoleMessage", | |
724 "type": "object", | |
725 "description": "Console message.", | |
726 "properties": [ | |
727 { "name": "source", "type": "string", "enum": ["xml", "javas
cript", "network", "console-api", "storage", "appcache", "rendering", "security"
, "other", "deprecation", "worker"], "description": "Message source." }, | |
728 { "name": "level", "type": "string", "enum": ["log", "warnin
g", "error", "debug", "info"], "description": "Message severity." }, | |
729 { "name": "text", "type": "string", "description": "Message
text." }, | |
730 { "name": "url", "type": "string", "optional": true, "descri
ption": "URL of the message origin." }, | |
731 { "name": "line", "type": "integer", "optional": true, "desc
ription": "Line number in the resource that generated this message (1-based)." }
, | |
732 { "name": "column", "type": "integer", "optional": true, "de
scription": "Column number in the resource that generated this message (1-based)
." } | |
733 ] | |
734 } | |
735 ], | |
736 "commands": [ | |
737 { | |
738 "name": "enable", | |
739 "description": "Enables console domain, sends the messages colle
cted so far to the client by means of the <code>messageAdded</code> notification
." | |
740 }, | |
741 { | |
742 "name": "disable", | |
743 "description": "Disables console domain, prevents further consol
e messages from being reported to the client." | |
744 }, | |
745 { | |
746 "name": "clearMessages", | |
747 "description": "Does nothing." | |
748 } | |
749 ], | |
750 "events": [ | |
751 { | |
752 "name": "messageAdded", | |
753 "parameters": [ | |
754 { "name": "message", "$ref": "ConsoleMessage", "description"
: "Console message that has been added." } | |
755 ], | |
756 "description": "Issued when new console message is added." | |
757 }, | |
758 { | |
759 "name": "messageRepeatCountUpdated", | |
760 "parameters": [ | |
761 { "name": "count", "type": "integer", "description": "New re
peat count value." }, | |
762 { "name": "timestamp", "$ref": "Runtime.Timestamp", "descrip
tion": "Timestamp of most recent message in batch.", "hidden": true } | |
763 ], | |
764 "description": "Not issued.", | |
765 "deprecated": true | |
766 }, | |
767 { | |
768 "name": "messagesCleared", | |
769 "description": "Not issued.", | |
770 "deprecated": true | |
771 } | |
772 ] | |
773 }, | |
774 { | |
775 "domain": "Profiler", | |
776 "dependencies": ["Runtime", "Debugger"], | |
777 "hidden": true, | |
778 "types": [ | |
779 { | |
780 "id": "CPUProfileNode", | |
781 "type": "object", | |
782 "description": "CPU Profile node. Holds callsite information, ex
ecution statistics and child nodes.", | |
783 "properties": [ | |
784 { "name": "callFrame", "$ref": "Runtime.CallFrame", "descrip
tion": "Function location." }, | |
785 { "name": "hitCount", "type": "integer", "description": "Num
ber of samples where this node was on top of the call stack." }, | |
786 { "name": "children", "type": "array", "items": { "$ref": "C
PUProfileNode" }, "description": "Child nodes." }, | |
787 { "name": "deoptReason", "type": "string", "description": "T
he reason of being not optimized. The function may be deoptimized or marked as d
on't optimize."}, | |
788 { "name": "id", "type": "integer", "description": "Unique id
of the node." }, | |
789 { "name": "positionTicks", "type": "array", "items": { "$ref
": "PositionTickInfo" }, "description": "An array of source position ticks." } | |
790 ] | |
791 }, | |
792 { | |
793 "id": "CPUProfile", | |
794 "type": "object", | |
795 "description": "Profile.", | |
796 "properties": [ | |
797 { "name": "head", "$ref": "CPUProfileNode" }, | |
798 { "name": "startTime", "type": "number", "description": "Pro
filing start time in seconds." }, | |
799 { "name": "endTime", "type": "number", "description": "Profi
ling end time in seconds." }, | |
800 { "name": "samples", "optional": true, "type": "array", "ite
ms": { "type": "integer" }, "description": "Ids of samples top nodes." }, | |
801 { "name": "timestamps", "optional": true, "type": "array", "
items": { "type": "number" }, "description": "Timestamps of the samples in micro
seconds." } | |
802 ] | |
803 }, | |
804 { | |
805 "id": "PositionTickInfo", | |
806 "type": "object", | |
807 "description": "Specifies a number of samples attributed to a ce
rtain source position.", | |
808 "properties": [ | |
809 { "name": "line", "type": "integer", "description": "Source
line number (1-based)." }, | |
810 { "name": "ticks", "type": "integer", "description": "Number
of samples attributed to the source line." } | |
811 ] | |
812 } | |
813 ], | |
814 "commands": [ | |
815 { | |
816 "name": "enable" | |
817 }, | |
818 { | |
819 "name": "disable" | |
820 }, | |
821 { | |
822 "name": "setSamplingInterval", | |
823 "parameters": [ | |
824 { "name": "interval", "type": "integer", "description": "New
sampling interval in microseconds." } | |
825 ], | |
826 "description": "Changes CPU profiler sampling interval. Must be
called before CPU profiles recording started." | |
827 }, | |
828 { | |
829 "name": "start" | |
830 }, | |
831 { | |
832 "name": "stop", | |
833 "returns": [ | |
834 { "name": "profile", "$ref": "CPUProfile", "description": "R
ecorded profile." } | |
835 ] | |
836 } | |
837 ], | |
838 "events": [ | |
839 { | |
840 "name": "consoleProfileStarted", | |
841 "parameters": [ | |
842 { "name": "id", "type": "string" }, | |
843 { "name": "location", "$ref": "Debugger.Location", "descript
ion": "Location of console.profile()." }, | |
844 { "name": "title", "type": "string", "optional": true, "desc
ription": "Profile title passed as argument to console.profile()." } | |
845 ], | |
846 "description": "Sent when new profile recodring is started using
console.profile() call." | |
847 }, | |
848 { | |
849 "name": "consoleProfileFinished", | |
850 "parameters": [ | |
851 { "name": "id", "type": "string" }, | |
852 { "name": "location", "$ref": "Debugger.Location", "descript
ion": "Location of console.profileEnd()." }, | |
853 { "name": "profile", "$ref": "CPUProfile" }, | |
854 { "name": "title", "type": "string", "optional": true, "desc
ription": "Profile title passed as argunet to console.profile()." } | |
855 ] | |
856 } | |
857 ] | |
858 }, | |
859 { | |
860 "domain": "HeapProfiler", | |
861 "dependencies": ["Runtime"], | |
862 "hidden": true, | |
863 "types": [ | |
864 { | |
865 "id": "HeapSnapshotObjectId", | |
866 "type": "string", | |
867 "description": "Heap snapshot object id." | |
868 }, | |
869 { | |
870 "id": "SamplingHeapProfileNode", | |
871 "type": "object", | |
872 "description": "Sampling Heap Profile node. Holds callsite infor
mation, allocation statistics and child nodes.", | |
873 "properties": [ | |
874 { "name": "callFrame", "$ref": "Runtime.CallFrame", "descrip
tion": "Function location." }, | |
875 { "name": "selfSize", "type": "number", "description": "Allo
cations size in bytes for the node excluding children." }, | |
876 { "name": "children", "type": "array", "items": { "$ref": "S
amplingHeapProfileNode" }, "description": "Child nodes." } | |
877 ] | |
878 }, | |
879 { | |
880 "id": "SamplingHeapProfile", | |
881 "type": "object", | |
882 "description": "Profile.", | |
883 "properties": [ | |
884 { "name": "head", "$ref": "SamplingHeapProfileNode" } | |
885 ] | |
886 } | |
887 ], | |
888 "commands": [ | |
889 { | |
890 "name": "enable" | |
891 }, | |
892 { | |
893 "name": "disable" | |
894 }, | |
895 { | |
896 "name": "startTrackingHeapObjects", | |
897 "parameters": [ | |
898 { "name": "trackAllocations", "type": "boolean", "optional":
true } | |
899 ] | |
900 }, | |
901 { | |
902 "name": "stopTrackingHeapObjects", | |
903 "parameters": [ | |
904 { "name": "reportProgress", "type": "boolean", "optional": t
rue, "description": "If true 'reportHeapSnapshotProgress' events will be generat
ed while snapshot is being taken when the tracking is stopped." } | |
905 ] | |
906 }, | |
907 { | |
908 "name": "takeHeapSnapshot", | |
909 "parameters": [ | |
910 { "name": "reportProgress", "type": "boolean", "optional": t
rue, "description": "If true 'reportHeapSnapshotProgress' events will be generat
ed while snapshot is being taken." } | |
911 ] | |
912 }, | |
913 { | |
914 "name": "collectGarbage" | |
915 }, | |
916 { | |
917 "name": "getObjectByHeapObjectId", | |
918 "parameters": [ | |
919 { "name": "objectId", "$ref": "HeapSnapshotObjectId" }, | |
920 { "name": "objectGroup", "type": "string", "optional": true,
"description": "Symbolic group name that can be used to release multiple object
s." } | |
921 ], | |
922 "returns": [ | |
923 { "name": "result", "$ref": "Runtime.RemoteObject", "descrip
tion": "Evaluation result." } | |
924 ] | |
925 }, | |
926 { | |
927 "name": "addInspectedHeapObject", | |
928 "parameters": [ | |
929 { "name": "heapObjectId", "$ref": "HeapSnapshotObjectId", "d
escription": "Heap snapshot object id to be accessible by means of $x command li
ne API." } | |
930 ], | |
931 "description": "Enables console to refer to the node with given
id via $x (see Command Line API for more details $x functions)." | |
932 }, | |
933 { | |
934 "name": "getHeapObjectId", | |
935 "parameters": [ | |
936 { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "des
cription": "Identifier of the object to get heap object id for." } | |
937 ], | |
938 "returns": [ | |
939 { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjec
tId", "description": "Id of the heap snapshot object corresponding to the passed
remote object id." } | |
940 ] | |
941 }, | |
942 { | |
943 "name": "startSampling", | |
944 "parameters": [ | |
945 { "name": "samplingInterval", "type": "number", "optional":
true, "description": "Average sample interval in bytes. Poisson distribution is
used for the intervals. The default value is 32768 bytes." } | |
946 ] | |
947 }, | |
948 { | |
949 "name": "stopSampling", | |
950 "returns": [ | |
951 { "name": "profile", "$ref": "SamplingHeapProfile", "descrip
tion": "Recorded sampling heap profile." } | |
952 ] | |
953 } | |
954 ], | |
955 "events": [ | |
956 { | |
957 "name": "addHeapSnapshotChunk", | |
958 "parameters": [ | |
959 { "name": "chunk", "type": "string" } | |
960 ] | |
961 }, | |
962 { | |
963 "name": "resetProfiles" | |
964 }, | |
965 { | |
966 "name": "reportHeapSnapshotProgress", | |
967 "parameters": [ | |
968 { "name": "done", "type": "integer" }, | |
969 { "name": "total", "type": "integer" }, | |
970 { "name": "finished", "type": "boolean", "optional": true } | |
971 ] | |
972 }, | |
973 { | |
974 "name": "lastSeenObjectId", | |
975 "description": "If heap objects tracking has been started then b
ackend regulary 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 hea
pStatsUpdate events will be sent before a new lastSeenObjectId event.", | |
976 "parameters": [ | |
977 { "name": "lastSeenObjectId", "type": "integer" }, | |
978 { "name": "timestamp", "type": "number" } | |
979 ] | |
980 }, | |
981 { | |
982 "name": "heapStatsUpdate", | |
983 "description": "If heap objects tracking has been started then b
ackend may send update for one or more fragments", | |
984 "parameters": [ | |
985 { "name": "statsUpdate", "type": "array", "items": { "type":
"integer" }, "description": "An array of triplets. Each triplet describes a fra
gment. The first integer is the fragment index, the second integer is a total co
unt of objects for the fragment, the third integer is a total size of the object
s for the fragment."} | |
986 ] | |
987 } | |
988 ] | |
989 }] | |
990 } | |
OLD | NEW |