aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/inspector
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-03-07 08:54:53 +0100
committerMichaël Zasso <targos@protonmail.com>2018-03-07 16:48:52 +0100
commit88786fecff336342a56e6f2e7ff3b286be716e47 (patch)
tree92e6ba5b8ac8dae1a058988d20c9d27bfa654390 /deps/v8/src/inspector
parent4e86f9b5ab83cbabf43839385bf383e6a7ef7d19 (diff)
downloadandroid-node-v8-88786fecff336342a56e6f2e7ff3b286be716e47.tar.gz
android-node-v8-88786fecff336342a56e6f2e7ff3b286be716e47.tar.bz2
android-node-v8-88786fecff336342a56e6f2e7ff3b286be716e47.zip
deps: update V8 to 6.5.254.31
PR-URL: https://github.com/nodejs/node/pull/18453 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yang Guo <yangguo@chromium.org> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'deps/v8/src/inspector')
-rw-r--r--deps/v8/src/inspector/BUILD.gn11
-rw-r--r--deps/v8/src/inspector/OWNERS3
-rw-r--r--deps/v8/src/inspector/injected-script-source.js28
-rw-r--r--deps/v8/src/inspector/injected_script_externs.js6
-rw-r--r--deps/v8/src/inspector/js_protocol.json4167
-rw-r--r--deps/v8/src/inspector/js_protocol.pdl1370
-rw-r--r--deps/v8/src/inspector/string-16.cc32
-rw-r--r--deps/v8/src/inspector/v8-console-message.cc5
-rw-r--r--deps/v8/src/inspector/v8-console-message.h1
-rw-r--r--deps/v8/src/inspector/v8-console.cc22
-rw-r--r--deps/v8/src/inspector/v8-debugger-agent-impl.cc34
-rw-r--r--deps/v8/src/inspector/v8-debugger-agent-impl.h1
-rw-r--r--deps/v8/src/inspector/v8-debugger.cc35
-rw-r--r--deps/v8/src/inspector/v8-debugger.h8
-rw-r--r--deps/v8/src/inspector/v8-heap-profiler-agent-impl.cc2
-rw-r--r--deps/v8/src/inspector/v8-injected-script-host.cc50
-rw-r--r--deps/v8/src/inspector/v8-injected-script-host.h2
-rw-r--r--deps/v8/src/inspector/v8-inspector-session-impl.cc5
-rw-r--r--deps/v8/src/inspector/v8-inspector-session-impl.h4
-rw-r--r--deps/v8/src/inspector/v8-stack-trace-impl.cc8
-rw-r--r--deps/v8/src/inspector/v8-stack-trace-impl.h1
-rw-r--r--deps/v8/src/inspector/v8-value-utils.cc1
22 files changed, 4513 insertions, 1283 deletions
diff --git a/deps/v8/src/inspector/BUILD.gn b/deps/v8/src/inspector/BUILD.gn
index 2ebf561135..699b1bcbd4 100644
--- a/deps/v8/src/inspector/BUILD.gn
+++ b/deps/v8/src/inspector/BUILD.gn
@@ -79,17 +79,6 @@ action("inspector_injected_script") {
config("inspector_config") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
- cflags = []
- if (is_win) {
- cflags += [
- "/wd4267", # Truncation from size_t to int.
- "/wd4305", # Truncation from 'type1' to 'type2'.
- "/wd4324", # Struct padded due to declspec(align).
- "/wd4714", # Function marked forceinline not inlined.
- "/wd4800", # Value forced to bool.
- "/wd4996", # Deprecated function call.
- ]
- }
if (is_component_build) {
defines = [ "BUILDING_V8_SHARED" ]
}
diff --git a/deps/v8/src/inspector/OWNERS b/deps/v8/src/inspector/OWNERS
index db3c906262..3cfeff35c4 100644
--- a/deps/v8/src/inspector/OWNERS
+++ b/deps/v8/src/inspector/OWNERS
@@ -12,5 +12,8 @@ yangguo@chromium.org
per-file js_protocol.json=set noparent
per-file js_protocol.json=dgozman@chromium.org
per-file js_protocol.json=pfeldman@chromium.org
+per-file js_protocol.pdl=set noparent
+per-file js_protocol.pdl=dgozman@chromium.org
+per-file js_protocol.pdl=pfeldman@chromium.org
# COMPONENT: Platform>DevTools>JavaScript
diff --git a/deps/v8/src/inspector/injected-script-source.js b/deps/v8/src/inspector/injected-script-source.js
index dd9067ca96..0849d44202 100644
--- a/deps/v8/src/inspector/injected-script-source.js
+++ b/deps/v8/src/inspector/injected-script-source.js
@@ -460,6 +460,10 @@ InjectedScript.prototype = {
if (InjectedScriptHost.subtype(o) === "proxy")
continue;
+ var typedArrays = subtype === "arraybuffer" ? InjectedScriptHost.typedArrayProperties(o) || [] : [];
+ for (var i = 0; i < typedArrays.length; i += 2)
+ addPropertyIfNeeded(descriptors, { name: typedArrays[i], value: typedArrays[i + 1], isOwn: true, enumerable: false, configurable: false, __proto__: null });
+
try {
if (skipGetOwnPropertyNames && o === object) {
if (!process(o, undefined, o.length))
@@ -586,15 +590,21 @@ InjectedScript.prototype = {
if (subtype === "node") {
var description = "";
- if (obj.nodeName)
- description = obj.nodeName.toLowerCase();
- else if (obj.constructor)
- description = obj.constructor.name.toLowerCase();
+ var nodeName = InjectedScriptHost.getProperty(obj, "nodeName");
+ if (nodeName) {
+ description = nodeName.toLowerCase();
+ } else {
+ var constructor = InjectedScriptHost.getProperty(obj, "constructor");
+ if (constructor)
+ description = (InjectedScriptHost.getProperty(constructor, "name") || "").toLowerCase();
+ }
- switch (obj.nodeType) {
+ var nodeType = InjectedScriptHost.getProperty(obj, "nodeType");
+ switch (nodeType) {
case 1 /* Node.ELEMENT_NODE */:
- description += obj.id ? "#" + obj.id : "";
- var className = obj.className;
+ var id = InjectedScriptHost.getProperty(obj, "id");
+ description += id ? "#" + id : "";
+ var className = InjectedScriptHost.getProperty(obj, "className");
description += (className && typeof className === "string") ? "." + className.trim().replace(/\s+/g, ".") : "";
break;
case 10 /*Node.DOCUMENT_TYPE_NODE */:
@@ -929,6 +939,10 @@ InjectedScript.RemoteObject.prototype = {
if ((subtype === "map" || subtype === "set") && descriptor.name === "size")
return true;
+ // Ignore ArrayBuffer previews
+ if (subtype === 'arraybuffer' && (descriptor.name === "[[Int8Array]]" || descriptor.name === "[[Uint8Array]]" || descriptor.name === "[[Int16Array]]" || descriptor.name === "[[Int32Array]]"))
+ return true;
+
// Never preview prototype properties.
if (!descriptor.isOwn)
return true;
diff --git a/deps/v8/src/inspector/injected_script_externs.js b/deps/v8/src/inspector/injected_script_externs.js
index 9c5555b624..d293b8547d 100644
--- a/deps/v8/src/inspector/injected_script_externs.js
+++ b/deps/v8/src/inspector/injected_script_externs.js
@@ -108,6 +108,12 @@ InjectedScriptHostClass.prototype.getOwnPropertySymbols = function(obj) {}
*/
InjectedScriptHostClass.prototype.nativeAccessorDescriptor = function(obj, name) {}
+/**
+ * @param {!Object} arrayBuffer
+ * @return {Array<Object>|undefined}
+ */
+InjectedScriptHostClass.prototype.typedArrayProperties = function(arrayBuffer) {}
+
/** @type {!InjectedScriptHostClass} */
var InjectedScriptHost;
/** @type {!Window} */
diff --git a/deps/v8/src/inspector/js_protocol.json b/deps/v8/src/inspector/js_protocol.json
index ea573d11a6..a0f7fcd7ed 100644
--- a/deps/v8/src/inspector/js_protocol.json
+++ b/deps/v8/src/inspector/js_protocol.json
@@ -1,1205 +1,2966 @@
{
- "version": { "major": "1", "minor": "3" },
- "domains": [
- {
- "domain": "Schema",
- "description": "This domain is deprecated.",
- "deprecated": true,
- "types": [
- {
- "id": "Domain",
- "type": "object",
- "description": "Description of the protocol domain.",
- "properties": [
- { "name": "name", "type": "string", "description": "Domain name." },
- { "name": "version", "type": "string", "description": "Domain version." }
- ]
- }
- ],
- "commands": [
- {
- "name": "getDomains",
- "description": "Returns supported domains.",
- "handlers": ["browser", "renderer"],
- "returns": [
- { "name": "domains", "type": "array", "items": { "$ref": "Domain" }, "description": "List of supported domains." }
- ]
- }
- ]
- },
- {
- "domain": "Runtime",
- "description": "Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.",
- "types": [
- {
- "id": "ScriptId",
- "type": "string",
- "description": "Unique script identifier."
- },
- {
- "id": "RemoteObjectId",
- "type": "string",
- "description": "Unique object identifier."
- },
- {
- "id": "UnserializableValue",
- "type": "string",
- "enum": ["Infinity", "NaN", "-Infinity", "-0"],
- "description": "Primitive value which cannot be JSON-stringified."
- },
- {
- "id": "RemoteObject",
- "type": "object",
- "description": "Mirror object referencing original JavaScript object.",
- "properties": [
- { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." },
- { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error", "proxy", "promise", "typedarray"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
- { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." },
- { "name": "value", "type": "any", "optional": true, "description": "Remote object value in case of primitive values or JSON values (if it was requested)." },
- { "name": "unserializableValue", "$ref": "UnserializableValue", "optional": true, "description": "Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property." },
- { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
- { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." },
- { "name": "preview", "$ref": "ObjectPreview", "optional": true, "description": "Preview containing abbreviated property values. Specified for <code>object</code> type values only.", "experimental": true },
- { "name": "customPreview", "$ref": "CustomPreview", "optional": true, "experimental": true}
- ]
- },
- {
- "id": "CustomPreview",
- "type": "object",
- "experimental": true,
- "properties": [
- { "name": "header", "type": "string"},
- { "name": "hasBody", "type": "boolean"},
- { "name": "formatterObjectId", "$ref": "RemoteObjectId"},
- { "name": "bindRemoteObjectFunctionId", "$ref": "RemoteObjectId" },
- { "name": "configObjectId", "$ref": "RemoteObjectId", "optional": true }
- ]
- },
- {
- "id": "ObjectPreview",
- "type": "object",
- "experimental": true,
- "description": "Object containing abbreviated remote object value.",
- "properties": [
- { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." },
- { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
- { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
- { "name": "overflow", "type": "boolean", "description": "True iff some of the properties or entries of the original object did not fit." },
- { "name": "properties", "type": "array", "items": { "$ref": "PropertyPreview" }, "description": "List of the properties." },
- { "name": "entries", "type": "array", "items": { "$ref": "EntryPreview" }, "optional": true, "description": "List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only." }
- ]
- },
- {
- "id": "PropertyPreview",
- "type": "object",
- "experimental": true,
- "properties": [
- { "name": "name", "type": "string", "description": "Property name." },
- { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol", "accessor"], "description": "Object type. Accessor means that the property itself is an accessor property." },
- { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." },
- { "name": "valuePreview", "$ref": "ObjectPreview", "optional": true, "description": "Nested value preview." },
- { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }
- ]
- },
- {
- "id": "EntryPreview",
- "type": "object",
- "experimental": true,
- "properties": [
- { "name": "key", "$ref": "ObjectPreview", "optional": true, "description": "Preview of the key. Specified for map-like collection entries." },
- { "name": "value", "$ref": "ObjectPreview", "description": "Preview of the value." }
- ]
- },
- {
- "id": "PropertyDescriptor",
- "type": "object",
- "description": "Object property descriptor.",
- "properties": [
- { "name": "name", "type": "string", "description": "Property name or symbol description." },
- { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." },
- { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." },
- { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." },
- { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." },
- { "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." },
- { "name": "enumerable", "type": "boolean", "description": "True if this property shows up during enumeration of the properties on the corresponding object." },
- { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." },
- { "name": "isOwn", "optional": true, "type": "boolean", "description": "True if the property is owned for the object." },
- { "name": "symbol", "$ref": "RemoteObject", "optional": true, "description": "Property symbol object, if the property is of the <code>symbol</code> type." }
- ]
- },
- {
- "id": "InternalPropertyDescriptor",
- "type": "object",
- "description": "Object internal property descriptor. This property isn't normally visible in JavaScript code.",
- "properties": [
- { "name": "name", "type": "string", "description": "Conventional property name." },
- { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." }
- ]
- },
- {
- "id": "CallArgument",
- "type": "object",
- "description": "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.",
- "properties": [
- { "name": "value", "type": "any", "optional": true, "description": "Primitive value or serializable javascript object." },
- { "name": "unserializableValue", "$ref": "UnserializableValue", "optional": true, "description": "Primitive value which can not be JSON-stringified." },
- { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Remote object handle." }
- ]
- },
- {
- "id": "ExecutionContextId",
- "type": "integer",
- "description": "Id of an execution context."
- },
- {
- "id": "ExecutionContextDescription",
- "type": "object",
- "description": "Description of an isolated world.",
- "properties": [
- { "name": "id", "$ref": "ExecutionContextId", "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed." },
- { "name": "origin", "type": "string", "description": "Execution context origin." },
- { "name": "name", "type": "string", "description": "Human readable name describing given context." },
- { "name": "auxData", "type": "object", "optional": true, "description": "Embedder-specific auxiliary data." }
- ]
- },
- {
- "id": "ExceptionDetails",
- "type": "object",
- "description": "Detailed information about exception (or error) that was thrown during script compilation or execution.",
- "properties": [
- { "name": "exceptionId", "type": "integer", "description": "Exception id." },
- { "name": "text", "type": "string", "description": "Exception text, which should be used together with exception object when available." },
- { "name": "lineNumber", "type": "integer", "description": "Line number of the exception location (0-based)." },
- { "name": "columnNumber", "type": "integer", "description": "Column number of the exception location (0-based)." },
- { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Script ID of the exception location." },
- { "name": "url", "type": "string", "optional": true, "description": "URL of the exception location, to be used when the script was not reported." },
- { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace if available." },
- { "name": "exception", "$ref": "RemoteObject", "optional": true, "description": "Exception object if available." },
- { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "Identifier of the context where exception happened." }
- ]
- },
- {
- "id": "Timestamp",
- "type": "number",
- "description": "Number of milliseconds since epoch."
- },
- {
- "id": "CallFrame",
- "type": "object",
- "description": "Stack entry for runtime errors and assertions.",
- "properties": [
- { "name": "functionName", "type": "string", "description": "JavaScript function name." },
- { "name": "scriptId", "$ref": "ScriptId", "description": "JavaScript script id." },
- { "name": "url", "type": "string", "description": "JavaScript script name or url." },
- { "name": "lineNumber", "type": "integer", "description": "JavaScript script line number (0-based)." },
- { "name": "columnNumber", "type": "integer", "description": "JavaScript script column number (0-based)." }
- ]
- },
- {
- "id": "StackTrace",
- "type": "object",
- "description": "Call frames for assertions or error messages.",
- "properties": [
- { "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." },
- { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "JavaScript function name." },
- { "name": "parent", "$ref": "StackTrace", "optional": true, "description": "Asynchronous JavaScript stack trace that preceded this stack, if available." },
- { "name": "parentId", "$ref": "StackTraceId", "optional": true, "experimental": true, "description": "Asynchronous JavaScript stack trace that preceded this stack, if available." }
- ]
- },
- {
- "id": "UniqueDebuggerId",
- "type": "string",
- "description": "Unique identifier of current debugger.",
- "experimental": true
- },
- {
- "id": "StackTraceId",
- "type": "object",
- "description": "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.",
- "properties": [
- { "name": "id", "type": "string" },
- { "name": "debuggerId", "$ref": "UniqueDebuggerId", "optional": true }
- ],
- "experimental": true
- }
- ],
- "commands": [
- {
- "name": "evaluate",
- "parameters": [
- { "name": "expression", "type": "string", "description": "Expression to evaluate." },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
- { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation." },
- { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." },
- { "name": "contextId", "$ref": "ExecutionContextId", "optional": true, "description": "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." },
- { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
- { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the result." },
- { "name": "userGesture", "type": "boolean", "optional": true, "description": "Whether execution should be treated as initiated by user in the UI." },
- { "name": "awaitPromise", "type": "boolean", "optional":true, "description": "Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved." }
- ],
- "returns": [
- { "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." },
- { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
- ],
- "description": "Evaluates expression on global object."
- },
- {
- "name": "awaitPromise",
- "parameters": [
- { "name": "promiseObjectId", "$ref": "RemoteObjectId", "description": "Identifier of the promise." },
- { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
- { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result." }
- ],
- "returns": [
- { "name": "result", "$ref": "RemoteObject", "description": "Promise result. Will contain rejected value if promise was rejected." },
- { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details if stack strace is available."}
- ],
- "description": "Add handler to promise with given promise object id."
- },
- {
- "name": "callFunctionOn",
- "parameters": [
- { "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." },
- { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Identifier of the object to call function on. Either objectId or executionContextId should be specified." },
- { "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." },
- { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." },
- { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." },
- { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the result." },
- { "name": "userGesture", "type": "boolean", "optional": true, "description": "Whether execution should be treated as initiated by user in the UI." },
- { "name": "awaitPromise", "type": "boolean", "optional":true, "description": "Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved." },
- { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified." },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "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." }
- ],
- "returns": [
- { "name": "result", "$ref": "RemoteObject", "description": "Call result." },
- { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
- ],
- "description": "Calls function with given declaration on the given object. Object group of the result is inherited from the target object."
- },
- {
- "name": "getProperties",
- "parameters": [
- { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return properties for." },
- { "name": "ownProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging only to the element itself, not to its prototype chain." },
- { "name": "accessorPropertiesOnly", "optional": true, "type": "boolean", "description": "If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.", "experimental": true },
- { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the results." }
- ],
- "returns": [
- { "name": "result", "type": "array", "items": { "$ref": "PropertyDescriptor" }, "description": "Object properties." },
- { "name": "internalProperties", "optional": true, "type": "array", "items": { "$ref": "InternalPropertyDescriptor" }, "description": "Internal object properties (only of the element itself)." },
- { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
- ],
- "description": "Returns properties of a given object. Object group of the result is inherited from the target object."
- },
- {
- "name": "releaseObject",
- "parameters": [
- { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to release." }
- ],
- "description": "Releases remote object with given id."
- },
- {
- "name": "releaseObjectGroup",
- "parameters": [
- { "name": "objectGroup", "type": "string", "description": "Symbolic object group name." }
- ],
- "description": "Releases all remote objects that belong to a given group."
- },
- {
- "name": "runIfWaitingForDebugger",
- "description": "Tells inspected instance to run if it was waiting for debugger to attach."
- },
- {
- "name": "enable",
- "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."
- },
- {
- "name": "disable",
- "description": "Disables reporting of execution contexts creation."
- },
- {
- "name": "discardConsoleEntries",
- "description": "Discards collected exceptions and console API calls."
- },
- {
- "name": "setCustomObjectFormatterEnabled",
- "parameters": [
- {
- "name": "enabled",
- "type": "boolean"
- }
- ],
- "experimental": true
- },
- {
- "name": "compileScript",
- "parameters": [
- { "name": "expression", "type": "string", "description": "Expression to compile." },
- { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." },
- { "name": "persistScript", "type": "boolean", "description": "Specifies whether the compiled script should be persisted." },
- { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "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." }
- ],
- "returns": [
- { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." },
- { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
- ],
- "description": "Compiles expression."
- },
- {
- "name": "runScript",
- "parameters": [
- { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." },
- { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "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." },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
- { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." },
- { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation." },
- { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." },
- { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result." },
- { "name": "awaitPromise", "type": "boolean", "optional": true, "description": "Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved." }
- ],
- "returns": [
- { "name": "result", "$ref": "RemoteObject", "description": "Run result." },
- { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
- ],
- "description": "Runs script with given id in a given context."
- },
- {
- "name": "queryObjects",
- "parameters": [
- { "name": "prototypeObjectId", "$ref": "RemoteObjectId", "description": "Identifier of the prototype to return objects for." }
- ],
- "returns": [
- { "name": "objects", "$ref": "RemoteObject", "description": "Array with objects." }
- ]
- },
- {
- "name": "globalLexicalScopeNames",
- "parameters": [
- { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which execution context to lookup global scope variables." }
- ],
- "returns": [
- { "name": "names", "type": "array", "items": { "type": "string" } }
- ],
- "description": "Returns all let, const and class variables from global scope."
- }
- ],
- "events": [
- {
- "name": "executionContextCreated",
- "parameters": [
- { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution context." }
- ],
- "description": "Issued when new execution context is created."
- },
- {
- "name": "executionContextDestroyed",
- "parameters": [
- { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Id of the destroyed context" }
- ],
- "description": "Issued when execution context is destroyed."
- },
- {
- "name": "executionContextsCleared",
- "description": "Issued when all executionContexts were cleared in browser"
- },
- {
- "name": "exceptionThrown",
- "description": "Issued when exception was thrown and unhandled.",
- "parameters": [
- { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp of the exception." },
- { "name": "exceptionDetails", "$ref": "ExceptionDetails" }
- ]
- },
- {
- "name": "exceptionRevoked",
- "description": "Issued when unhandled exception was revoked.",
- "parameters": [
- { "name": "reason", "type": "string", "description": "Reason describing why exception was revoked." },
- { "name": "exceptionId", "type": "integer", "description": "The id of revoked exception, as reported in <code>exceptionThrown</code>." }
- ]
- },
- {
- "name": "consoleAPICalled",
- "description": "Issued when console API was called.",
- "parameters": [
- { "name": "type", "type": "string", "enum": ["log", "debug", "info", "error", "warning", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "profile", "profileEnd", "count", "timeEnd"], "description": "Type of the call." },
- { "name": "args", "type": "array", "items": { "$ref": "RemoteObject" }, "description": "Call arguments." },
- { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Identifier of the context where the call was made." },
- { "name": "timestamp", "$ref": "Timestamp", "description": "Call timestamp." },
- { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "Stack trace captured when the call was made." },
- { "name": "context", "type": "string", "optional": true, "experimental": true, "description": "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." }
- ]
- },
- {
- "name": "inspectRequested",
- "description": "Issued when object should be inspected (for example, as a result of inspect() command line API call).",
- "parameters": [
- { "name": "object", "$ref": "RemoteObject" },
- { "name": "hints", "type": "object" }
- ]
- }
- ]
- },
- {
- "domain": "Debugger",
- "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.",
- "dependencies": ["Runtime"],
- "types": [
- {
- "id": "BreakpointId",
- "type": "string",
- "description": "Breakpoint identifier."
- },
- {
- "id": "CallFrameId",
- "type": "string",
- "description": "Call frame identifier."
- },
- {
- "id": "Location",
- "type": "object",
- "properties": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier as reported in the <code>Debugger.scriptParsed</code>." },
- { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." },
- { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number in the script (0-based)." }
- ],
- "description": "Location in the source code."
- },
- {
- "id": "ScriptPosition",
- "experimental": true,
- "type": "object",
- "properties": [
- { "name": "lineNumber", "type": "integer" },
- { "name": "columnNumber", "type": "integer" }
- ],
- "description": "Location in the source code."
- },
- {
- "id": "CallFrame",
- "type": "object",
- "properties": [
- { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused." },
- { "name": "functionName", "type": "string", "description": "Name of the JavaScript function called on this call frame." },
- { "name": "functionLocation", "$ref": "Location", "optional": true, "description": "Location in the source code." },
- { "name": "location", "$ref": "Location", "description": "Location in the source code." },
- { "name": "url", "type": "string", "description": "JavaScript script name or url." },
- { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for this call frame." },
- { "name": "this", "$ref": "Runtime.RemoteObject", "description": "<code>this</code> object for this call frame." },
- { "name": "returnValue", "$ref": "Runtime.RemoteObject", "optional": true, "description": "The value being returned, if the function is at return point." }
- ],
- "description": "JavaScript call frame. Array of call frames form the call stack."
- },
- {
- "id": "Scope",
- "type": "object",
- "properties": [
- { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch", "block", "script", "eval", "module"], "description": "Scope type." },
- { "name": "object", "$ref": "Runtime.RemoteObject", "description": "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." },
- { "name": "name", "type": "string", "optional": true },
- { "name": "startLocation", "$ref": "Location", "optional": true, "description": "Location in the source code where scope starts" },
- { "name": "endLocation", "$ref": "Location", "optional": true, "description": "Location in the source code where scope ends" }
- ],
- "description": "Scope description."
- },
- {
- "id": "SearchMatch",
- "type": "object",
- "description": "Search match for resource.",
- "properties": [
- { "name": "lineNumber", "type": "number", "description": "Line number in resource content." },
- { "name": "lineContent", "type": "string", "description": "Line with match content." }
- ]
- },
- {
- "id": "BreakLocation",
- "type": "object",
- "properties": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier as reported in the <code>Debugger.scriptParsed</code>." },
- { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." },
- { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number in the script (0-based)." },
- { "name": "type", "type": "string", "enum": [ "debuggerStatement", "call", "return" ], "optional": true }
- ]
- }
- ],
- "commands": [
- {
- "name": "enable",
- "returns": [
- { "name": "debuggerId", "$ref": "Runtime.UniqueDebuggerId", "experimental": true, "description": "Unique identifier of the debugger." }
- ],
- "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received."
- },
- {
- "name": "disable",
- "description": "Disables debugger for given page."
- },
- {
- "name": "setBreakpointsActive",
- "parameters": [
- { "name": "active", "type": "boolean", "description": "New value for breakpoints active state." }
- ],
- "description": "Activates / deactivates all breakpoints on the page."
- },
- {
- "name": "setSkipAllPauses",
- "parameters": [
- { "name": "skip", "type": "boolean", "description": "New value for skip pauses state." }
- ],
- "description": "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc)."
- },
- {
- "name": "setBreakpointByUrl",
- "parameters": [
- { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." },
- { "name": "url", "type": "string", "optional": true, "description": "URL of the resources to set breakpoint on." },
- { "name": "urlRegex", "type": "string", "optional": true, "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified." },
- { "name": "scriptHash", "type": "string", "optional": true, "description": "Script hash of the resources to set breakpoint on." },
- { "name": "columnNumber", "type": "integer", "optional": true, "description": "Offset in the line to set breakpoint at." },
- { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." }
- ],
- "returns": [
- { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." },
- { "name": "locations", "type": "array", "items": { "$ref": "Location" }, "description": "List of the locations this breakpoint resolved into upon addition." }
- ],
- "description": "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."
- },
- {
- "name": "setBreakpoint",
- "parameters": [
- { "name": "location", "$ref": "Location", "description": "Location to set breakpoint in." },
- { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." }
- ],
- "returns": [
- { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." },
- { "name": "actualLocation", "$ref": "Location", "description": "Location this breakpoint resolved into." }
- ],
- "description": "Sets JavaScript breakpoint at a given location."
- },
- {
- "name": "removeBreakpoint",
- "parameters": [
- { "name": "breakpointId", "$ref": "BreakpointId" }
- ],
- "description": "Removes JavaScript breakpoint."
- },
- {
- "name": "getPossibleBreakpoints",
- "parameters": [
- { "name": "start", "$ref": "Location", "description": "Start of range to search possible breakpoint locations in." },
- { "name": "end", "$ref": "Location", "optional": true, "description": "End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range." },
- { "name": "restrictToFunction", "type": "boolean", "optional": true, "description": "Only consider locations which are in the same (non-nested) function as start." }
- ],
- "returns": [
- { "name": "locations", "type": "array", "items": { "$ref": "BreakLocation" }, "description": "List of the possible breakpoint locations." }
- ],
- "description": "Returns possible locations for breakpoint. scriptId in start and end range locations should be the same."
- },
- {
- "name": "continueToLocation",
- "parameters": [
- { "name": "location", "$ref": "Location", "description": "Location to continue to." },
- { "name": "targetCallFrames", "type": "string", "enum": ["any", "current"], "optional": true }
- ],
- "description": "Continues execution until specific location is reached."
- },
- {
- "name": "pauseOnAsyncCall",
- "parameters": [
- { "name": "parentStackTraceId", "$ref": "Runtime.StackTraceId", "description": "Debugger will pause when async call with given stack trace is started." }
- ],
- "experimental": true
- },
- {
- "name": "stepOver",
- "description": "Steps over the statement."
- },
- {
- "name": "stepInto",
- "parameters": [
- { "name": "breakOnAsyncCall", "type": "boolean", "optional": true, "experimental": true, "description": "Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause." }
- ],
- "description": "Steps into the function call."
- },
- {
- "name": "stepOut",
- "description": "Steps out of the function call."
- },
- {
- "name": "pause",
- "description": "Stops on the next JavaScript statement."
- },
- {
- "name": "scheduleStepIntoAsync",
- "description": "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.",
- "experimental": true
- },
- {
- "name": "resume",
- "description": "Resumes JavaScript execution."
- },
- {
- "name": "getStackTrace",
- "parameters": [
- { "name": "stackTraceId", "$ref": "Runtime.StackTraceId" }
- ],
- "returns": [
- { "name": "stackTrace", "$ref": "Runtime.StackTrace" }
- ],
- "description": "Returns stack trace with given <code>stackTraceId</code>.",
- "experimental": true
- },
- {
- "name": "searchInContent",
- "parameters": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to search in." },
- { "name": "query", "type": "string", "description": "String to search for." },
- { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." },
- { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." }
- ],
- "returns": [
- { "name": "result", "type": "array", "items": { "$ref": "SearchMatch" }, "description": "List of search matches." }
- ],
- "description": "Searches for given string in script content."
- },
- {
- "name": "setScriptSource",
- "parameters": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to edit." },
- { "name": "scriptSource", "type": "string", "description": "New content of the script." },
- { "name": "dryRun", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code." }
- ],
- "returns": [
- { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame" }, "description": "New stack trace in case editing has happened while VM was stopped." },
- { "name": "stackChanged", "type": "boolean", "optional": true, "description": "Whether current call stack was modified after applying the changes." },
- { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." },
- { "name": "asyncStackTraceId", "$ref": "Runtime.StackTraceId", "optional": true, "experimental": true, "description": "Async stack trace, if any." },
- { "name": "exceptionDetails", "optional": true, "$ref": "Runtime.ExceptionDetails", "description": "Exception details if any." }
- ],
- "description": "Edits JavaScript source live."
- },
- {
- "name": "restartFrame",
- "parameters": [
- { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." }
- ],
- "returns": [
- { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "New stack trace." },
- { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." },
- { "name": "asyncStackTraceId", "$ref": "Runtime.StackTraceId", "optional": true, "experimental": true, "description": "Async stack trace, if any." }
- ],
- "description": "Restarts particular call frame from the beginning."
- },
- {
- "name": "getScriptSource",
- "parameters": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to get source for." }
- ],
- "returns": [
- { "name": "scriptSource", "type": "string", "description": "Script source." }
- ],
- "description": "Returns source for the script with given id."
- },
- {
- "name": "setPauseOnExceptions",
- "parameters": [
- { "name": "state", "type": "string", "enum": ["none", "uncaught", "all"], "description": "Pause on exceptions mode." }
- ],
- "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>."
- },
- {
- "name": "evaluateOnCallFrame",
- "parameters": [
- { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." },
- { "name": "expression", "type": "string", "description": "Expression to evaluate." },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>)." },
- { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false." },
- { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." },
- { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
- { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the result." },
- { "name": "throwOnSideEffect", "type": "boolean", "optional": true, "description": "Whether to throw an exception if side effect cannot be ruled out during evaluation." }
- ],
- "returns": [
- { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Object wrapper for the evaluation result." },
- { "name": "exceptionDetails", "$ref": "Runtime.ExceptionDetails", "optional": true, "description": "Exception details."}
- ],
- "description": "Evaluates expression on a given call frame."
- },
- {
- "name": "setVariableValue",
- "parameters": [
- { "name": "scopeNumber", "type": "integer", "description": "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." },
- { "name": "variableName", "type": "string", "description": "Variable name." },
- { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." },
- { "name": "callFrameId", "$ref": "CallFrameId", "description": "Id of callframe that holds variable." }
- ],
- "description": "Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually."
- },
- {
- "name": "setReturnValue",
- "parameters": [
- { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New return value." }
- ],
- "experimental": true,
- "description": "Changes return value in top frame. Available only at return break position."
- },
- {
- "name": "setAsyncCallStackDepth",
- "parameters": [
- { "name": "maxDepth", "type": "integer", "description": "Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default)." }
- ],
- "description": "Enables or disables async call stacks tracking."
- },
- {
- "name": "setBlackboxPatterns",
- "parameters": [
- { "name": "patterns", "type": "array", "items": { "type": "string" }, "description": "Array of regexps that will be used to check script url for blackbox state." }
- ],
- "experimental": true,
- "description": "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."
- },
- {
- "name": "setBlackboxedRanges",
- "parameters": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script." },
- { "name": "positions", "type": "array", "items": { "$ref": "ScriptPosition" } }
- ],
- "experimental": true,
- "description": "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."
- }
- ],
- "events": [
- {
- "name": "scriptParsed",
- "parameters": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Identifier of the script parsed." },
- { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." },
- { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." },
- { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." },
- { "name": "endLine", "type": "integer", "description": "Last line of the script." },
- { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." },
- { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Specifies script creation context." },
- { "name": "hash", "type": "string", "description": "Content hash of the script."},
- { "name": "executionContextAuxData", "type": "object", "optional": true, "description": "Embedder-specific auxiliary data." },
- { "name": "isLiveEdit", "type": "boolean", "optional": true, "description": "True, if this script is generated as a result of the live edit operation.", "experimental": true },
- { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." },
- { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL." },
- { "name": "isModule", "type": "boolean", "optional": true, "description": "True, if this script is ES6 module." },
- { "name": "length", "type": "integer", "optional": true, "description": "This script length." },
- { "name": "stackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript top stack frame of where the script parsed event was triggered if available.", "experimental": true }
- ],
- "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger."
- },
- {
- "name": "scriptFailedToParse",
- "parameters": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Identifier of the script parsed." },
- { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." },
- { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." },
- { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." },
- { "name": "endLine", "type": "integer", "description": "Last line of the script." },
- { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." },
- { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Specifies script creation context." },
- { "name": "hash", "type": "string", "description": "Content hash of the script."},
- { "name": "executionContextAuxData", "type": "object", "optional": true, "description": "Embedder-specific auxiliary data." },
- { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." },
- { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL." },
- { "name": "isModule", "type": "boolean", "optional": true, "description": "True, if this script is ES6 module." },
- { "name": "length", "type": "integer", "optional": true, "description": "This script length." },
- { "name": "stackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript top stack frame of where the script parsed event was triggered if available.", "experimental": true }
- ],
- "description": "Fired when virtual machine fails to parse the script."
- },
- {
- "name": "breakpointResolved",
- "parameters": [
- { "name": "breakpointId", "$ref": "BreakpointId", "description": "Breakpoint unique identifier." },
- { "name": "location", "$ref": "Location", "description": "Actual breakpoint location." }
- ],
- "description": "Fired when breakpoint is resolved to an actual script and location."
- },
- {
- "name": "paused",
- "parameters": [
- { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." },
- { "name": "reason", "type": "string", "enum": [ "XHR", "DOM", "EventListener", "exception", "assert", "debugCommand", "promiseRejection", "OOM", "other", "ambiguous" ], "description": "Pause reason." },
- { "name": "data", "type": "object", "optional": true, "description": "Object containing break-specific auxiliary properties." },
- { "name": "hitBreakpoints", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Hit breakpoints IDs" },
- { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." },
- { "name": "asyncStackTraceId", "$ref": "Runtime.StackTraceId", "optional": true, "experimental": true, "description": "Async stack trace, if any." },
- { "name": "asyncCallStackTraceId", "$ref": "Runtime.StackTraceId", "optional": true, "experimental": true, "description": "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." }
- ],
- "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria."
- },
- {
- "name": "resumed",
- "description": "Fired when the virtual machine resumed execution."
- }
- ]
+ "version": {
+ "major": "1",
+ "minor": "3"
},
- {
- "domain": "Console",
- "description": "This domain is deprecated - use Runtime or Log instead.",
- "dependencies": ["Runtime"],
- "deprecated": true,
- "types": [
- {
- "id": "ConsoleMessage",
- "type": "object",
- "description": "Console message.",
- "properties": [
- { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "security", "other", "deprecation", "worker"], "description": "Message source." },
- { "name": "level", "type": "string", "enum": ["log", "warning", "error", "debug", "info"], "description": "Message severity." },
- { "name": "text", "type": "string", "description": "Message text." },
- { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." },
- { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message (1-based)." },
- { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message (1-based)." }
- ]
- }
- ],
- "commands": [
- {
- "name": "enable",
- "description": "Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification."
- },
- {
- "name": "disable",
- "description": "Disables console domain, prevents further console messages from being reported to the client."
- },
- {
- "name": "clearMessages",
- "description": "Does nothing."
- }
- ],
- "events": [
- {
- "name": "messageAdded",
- "parameters": [
- { "name": "message", "$ref": "ConsoleMessage", "description": "Console message that has been added." }
- ],
- "description": "Issued when new console message is added."
- }
- ]
- },
- {
- "domain": "Profiler",
- "dependencies": ["Runtime", "Debugger"],
- "types": [
- {
- "id": "ProfileNode",
- "type": "object",
- "description": "Profile node. Holds callsite information, execution statistics and child nodes.",
- "properties": [
- { "name": "id", "type": "integer", "description": "Unique id of the node." },
- { "name": "callFrame", "$ref": "Runtime.CallFrame", "description": "Function location." },
- { "name": "hitCount", "type": "integer", "optional": true, "description": "Number of samples where this node was on top of the call stack." },
- { "name": "children", "type": "array", "items": { "type": "integer" }, "optional": true, "description": "Child node ids." },
- { "name": "deoptReason", "type": "string", "optional": true, "description": "The reason of being not optimized. The function may be deoptimized or marked as don't optimize."},
- { "name": "positionTicks", "type": "array", "items": { "$ref": "PositionTickInfo" }, "optional": true, "description": "An array of source position ticks." }
- ]
- },
- {
- "id": "Profile",
- "type": "object",
- "description": "Profile.",
- "properties": [
- { "name": "nodes", "type": "array", "items": { "$ref": "ProfileNode" }, "description": "The list of profile nodes. First item is the root node." },
- { "name": "startTime", "type": "number", "description": "Profiling start timestamp in microseconds." },
- { "name": "endTime", "type": "number", "description": "Profiling end timestamp in microseconds." },
- { "name": "samples", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Ids of samples top nodes." },
- { "name": "timeDeltas", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime." }
- ]
- },
- {
- "id": "PositionTickInfo",
- "type": "object",
- "description": "Specifies a number of samples attributed to a certain source position.",
- "properties": [
- { "name": "line", "type": "integer", "description": "Source line number (1-based)." },
- { "name": "ticks", "type": "integer", "description": "Number of samples attributed to the source line." }
- ]
- },
- { "id": "CoverageRange",
- "type": "object",
- "description": "Coverage data for a source range.",
- "properties": [
- { "name": "startOffset", "type": "integer", "description": "JavaScript script source offset for the range start." },
- { "name": "endOffset", "type": "integer", "description": "JavaScript script source offset for the range end." },
- { "name": "count", "type": "integer", "description": "Collected execution count of the source range." }
- ]
- },
- { "id": "FunctionCoverage",
- "type": "object",
- "description": "Coverage data for a JavaScript function.",
- "properties": [
- { "name": "functionName", "type": "string", "description": "JavaScript function name." },
- { "name": "ranges", "type": "array", "items": { "$ref": "CoverageRange" }, "description": "Source ranges inside the function with coverage data." },
- { "name": "isBlockCoverage", "type": "boolean", "description": "Whether coverage data for this function has block granularity." }
- ]
- },
- {
- "id": "ScriptCoverage",
- "type": "object",
- "description": "Coverage data for a JavaScript script.",
- "properties": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "JavaScript script id." },
- { "name": "url", "type": "string", "description": "JavaScript script name or url." },
- { "name": "functions", "type": "array", "items": { "$ref": "FunctionCoverage" }, "description": "Functions contained in the script that has coverage data." }
- ]
- },
- { "id": "TypeObject",
- "type": "object",
- "description": "Describes a type collected during runtime.",
- "properties": [
- { "name": "name", "type": "string", "description": "Name of a type collected with type profiling." }
- ],
- "experimental": true
- },
- { "id": "TypeProfileEntry",
- "type": "object",
- "description": "Source offset and types for a parameter or return value.",
- "properties": [
- { "name": "offset", "type": "integer", "description": "Source offset of the parameter or end of function for return values." },
- { "name": "types", "type": "array", "items": {"$ref": "TypeObject"}, "description": "The types for this parameter or return value."}
- ],
- "experimental": true
- },
- {
- "id": "ScriptTypeProfile",
- "type": "object",
- "description": "Type profile data collected during runtime for a JavaScript script.",
- "properties": [
- { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "JavaScript script id." },
- { "name": "url", "type": "string", "description": "JavaScript script name or url." },
- { "name": "entries", "type": "array", "items": { "$ref": "TypeProfileEntry" }, "description": "Type profile entries for parameters and return values of the functions in the script." }
- ],
- "experimental": true
- }
- ],
- "commands": [
- {
- "name": "enable"
- },
- {
- "name": "disable"
- },
- {
- "name": "setSamplingInterval",
- "parameters": [
- { "name": "interval", "type": "integer", "description": "New sampling interval in microseconds." }
- ],
- "description": "Changes CPU profiler sampling interval. Must be called before CPU profiles recording started."
- },
- {
- "name": "start"
- },
- {
- "name": "stop",
- "returns": [
- { "name": "profile", "$ref": "Profile", "description": "Recorded profile." }
- ]
- },
- {
- "name": "startPreciseCoverage",
- "parameters": [
- { "name": "callCount", "type": "boolean", "optional": true, "description": "Collect accurate call counts beyond simple 'covered' or 'not covered'." },
- { "name": "detailed", "type": "boolean", "optional": true, "description": "Collect block-based coverage." }
- ],
- "description": "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."
- },
- {
- "name": "stopPreciseCoverage",
- "description": "Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code."
- },
- {
- "name": "takePreciseCoverage",
- "returns": [
- { "name": "result", "type": "array", "items": { "$ref": "ScriptCoverage" }, "description": "Coverage data for the current isolate." }
- ],
- "description": "Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started."
- },
- {
- "name": "getBestEffortCoverage",
- "returns": [
- { "name": "result", "type": "array", "items": { "$ref": "ScriptCoverage" }, "description": "Coverage data for the current isolate." }
- ],
- "description": "Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection."
- },
- {
- "name": "startTypeProfile",
- "description": "Enable type profile.",
- "experimental": true
- },
- {
- "name": "stopTypeProfile",
- "description": "Disable type profile. Disabling releases type profile data collected so far.",
- "experimental": true
- },
- {
- "name": "takeTypeProfile",
- "returns": [
- { "name": "result", "type": "array", "items": { "$ref": "ScriptTypeProfile" }, "description": "Type profile for all scripts since startTypeProfile() was turned on." }
- ],
- "description": "Collect type profile.",
- "experimental": true
- }
- ],
- "events": [
- {
- "name": "consoleProfileStarted",
- "parameters": [
- { "name": "id", "type": "string" },
- { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profile()." },
- { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as an argument to console.profile()." }
- ],
- "description": "Sent when new profile recording is started using console.profile() call."
- },
- {
- "name": "consoleProfileFinished",
- "parameters": [
- { "name": "id", "type": "string" },
- { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profileEnd()." },
- { "name": "profile", "$ref": "Profile" },
- { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as an argument to console.profile()." }
- ]
- }
- ]
- },
- {
- "domain": "HeapProfiler",
- "dependencies": ["Runtime"],
- "experimental": true,
- "types": [
- {
- "id": "HeapSnapshotObjectId",
- "type": "string",
- "description": "Heap snapshot object id."
- },
- {
- "id": "SamplingHeapProfileNode",
- "type": "object",
- "description": "Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.",
- "properties": [
- { "name": "callFrame", "$ref": "Runtime.CallFrame", "description": "Function location." },
- { "name": "selfSize", "type": "number", "description": "Allocations size in bytes for the node excluding children." },
- { "name": "children", "type": "array", "items": { "$ref": "SamplingHeapProfileNode" }, "description": "Child nodes." }
- ]
- },
- {
- "id": "SamplingHeapProfile",
- "type": "object",
- "description": "Profile.",
- "properties": [
- { "name": "head", "$ref": "SamplingHeapProfileNode" }
- ]
- }
- ],
- "commands": [
- {
- "name": "enable"
- },
- {
- "name": "disable"
- },
- {
- "name": "startTrackingHeapObjects",
- "parameters": [
- { "name": "trackAllocations", "type": "boolean", "optional": true }
- ]
- },
- {
- "name": "stopTrackingHeapObjects",
- "parameters": [
- { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped." }
- ]
- },
- {
- "name": "takeHeapSnapshot",
- "parameters": [
- { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." }
- ]
- },
- {
- "name": "collectGarbage"
- },
- {
- "name": "getObjectByHeapObjectId",
- "parameters": [
- { "name": "objectId", "$ref": "HeapSnapshotObjectId" },
- { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
- ],
- "returns": [
- { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." }
- ]
- },
- {
- "name": "addInspectedHeapObject",
- "parameters": [
- { "name": "heapObjectId", "$ref": "HeapSnapshotObjectId", "description": "Heap snapshot object id to be accessible by means of $x command line API." }
- ],
- "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions)."
- },
- {
- "name": "getHeapObjectId",
- "parameters": [
- { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." }
- ],
- "returns": [
- { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." }
- ]
- },
- {
- "name": "startSampling",
- "parameters": [
- { "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." }
- ]
- },
- {
- "name": "stopSampling",
- "returns": [
- { "name": "profile", "$ref": "SamplingHeapProfile", "description": "Recorded sampling heap profile." }
- ]
- },
- {
- "name": "getSamplingProfile",
- "returns": [
- { "name": "profile", "$ref": "SamplingHeapProfile", "description": "Return the sampling profile being collected." }
- ]
- }
- ],
- "events": [
- {
- "name": "addHeapSnapshotChunk",
- "parameters": [
- { "name": "chunk", "type": "string" }
- ]
- },
- {
- "name": "resetProfiles"
- },
- {
- "name": "reportHeapSnapshotProgress",
- "parameters": [
- { "name": "done", "type": "integer" },
- { "name": "total", "type": "integer" },
- { "name": "finished", "type": "boolean", "optional": true }
- ]
- },
- {
- "name": "lastSeenObjectId",
- "description": "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.",
- "parameters": [
- { "name": "lastSeenObjectId", "type": "integer" },
- { "name": "timestamp", "type": "number" }
- ]
- },
- {
- "name": "heapStatsUpdate",
- "description": "If heap objects tracking has been started then backend may send update for one or more fragments",
- "parameters": [
- { "name": "statsUpdate", "type": "array", "items": { "type": "integer" }, "description": "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."}
- ]
- }
- ]
- }]
-}
+ "domains": [
+ {
+ "domain": "Console",
+ "description": "This domain is deprecated - use Runtime or Log instead.",
+ "deprecated": true,
+ "dependencies": [
+ "Runtime"
+ ],
+ "types": [
+ {
+ "id": "ConsoleMessage",
+ "description": "Console message.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "source",
+ "description": "Message source.",
+ "type": "string",
+ "enum": [
+ "xml",
+ "javascript",
+ "network",
+ "console-api",
+ "storage",
+ "appcache",
+ "rendering",
+ "security",
+ "other",
+ "deprecation",
+ "worker"
+ ]
+ },
+ {
+ "name": "level",
+ "description": "Message severity.",
+ "type": "string",
+ "enum": [
+ "log",
+ "warning",
+ "error",
+ "debug",
+ "info"
+ ]
+ },
+ {
+ "name": "text",
+ "description": "Message text.",
+ "type": "string"
+ },
+ {
+ "name": "url",
+ "description": "URL of the message origin.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "line",
+ "description": "Line number in the resource that generated this message (1-based).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "column",
+ "description": "Column number in the resource that generated this message (1-based).",
+ "optional": true,
+ "type": "integer"
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "clearMessages",
+ "description": "Does nothing."
+ },
+ {
+ "name": "disable",
+ "description": "Disables console domain, prevents further console messages from being reported to the client."
+ },
+ {
+ "name": "enable",
+ "description": "Enables console domain, sends the messages collected so far to the client by means of the\n`messageAdded` notification."
+ }
+ ],
+ "events": [
+ {
+ "name": "messageAdded",
+ "description": "Issued when new console message is added.",
+ "parameters": [
+ {
+ "name": "message",
+ "description": "Console message that has been added.",
+ "$ref": "ConsoleMessage"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "Debugger",
+ "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing\nbreakpoints, stepping through execution, exploring stack traces, etc.",
+ "dependencies": [
+ "Runtime"
+ ],
+ "types": [
+ {
+ "id": "BreakpointId",
+ "description": "Breakpoint identifier.",
+ "type": "string"
+ },
+ {
+ "id": "CallFrameId",
+ "description": "Call frame identifier.",
+ "type": "string"
+ },
+ {
+ "id": "Location",
+ "description": "Location in the source code.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "scriptId",
+ "description": "Script identifier as reported in the `Debugger.scriptParsed`.",
+ "$ref": "Runtime.ScriptId"
+ },
+ {
+ "name": "lineNumber",
+ "description": "Line number in the script (0-based).",
+ "type": "integer"
+ },
+ {
+ "name": "columnNumber",
+ "description": "Column number in the script (0-based).",
+ "optional": true,
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "id": "ScriptPosition",
+ "description": "Location in the source code.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "lineNumber",
+ "type": "integer"
+ },
+ {
+ "name": "columnNumber",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "id": "CallFrame",
+ "description": "JavaScript call frame. Array of call frames form the call stack.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "callFrameId",
+ "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused.",
+ "$ref": "CallFrameId"
+ },
+ {
+ "name": "functionName",
+ "description": "Name of the JavaScript function called on this call frame.",
+ "type": "string"
+ },
+ {
+ "name": "functionLocation",
+ "description": "Location in the source code.",
+ "optional": true,
+ "$ref": "Location"
+ },
+ {
+ "name": "location",
+ "description": "Location in the source code.",
+ "$ref": "Location"
+ },
+ {
+ "name": "url",
+ "description": "JavaScript script name or url.",
+ "type": "string"
+ },
+ {
+ "name": "scopeChain",
+ "description": "Scope chain for this call frame.",
+ "type": "array",
+ "items": {
+ "$ref": "Scope"
+ }
+ },
+ {
+ "name": "this",
+ "description": "`this` object for this call frame.",
+ "$ref": "Runtime.RemoteObject"
+ },
+ {
+ "name": "returnValue",
+ "description": "The value being returned, if the function is at return point.",
+ "optional": true,
+ "$ref": "Runtime.RemoteObject"
+ }
+ ]
+ },
+ {
+ "id": "Scope",
+ "description": "Scope description.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "type",
+ "description": "Scope type.",
+ "type": "string",
+ "enum": [
+ "global",
+ "local",
+ "with",
+ "closure",
+ "catch",
+ "block",
+ "script",
+ "eval",
+ "module"
+ ]
+ },
+ {
+ "name": "object",
+ "description": "Object representing the scope. For `global` and `with` scopes it represents the actual\nobject; for the rest of the scopes, it is artificial transient object enumerating scope\nvariables as its properties.",
+ "$ref": "Runtime.RemoteObject"
+ },
+ {
+ "name": "name",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "startLocation",
+ "description": "Location in the source code where scope starts",
+ "optional": true,
+ "$ref": "Location"
+ },
+ {
+ "name": "endLocation",
+ "description": "Location in the source code where scope ends",
+ "optional": true,
+ "$ref": "Location"
+ }
+ ]
+ },
+ {
+ "id": "SearchMatch",
+ "description": "Search match for resource.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "lineNumber",
+ "description": "Line number in resource content.",
+ "type": "number"
+ },
+ {
+ "name": "lineContent",
+ "description": "Line with match content.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "id": "BreakLocation",
+ "type": "object",
+ "properties": [
+ {
+ "name": "scriptId",
+ "description": "Script identifier as reported in the `Debugger.scriptParsed`.",
+ "$ref": "Runtime.ScriptId"
+ },
+ {
+ "name": "lineNumber",
+ "description": "Line number in the script (0-based).",
+ "type": "integer"
+ },
+ {
+ "name": "columnNumber",
+ "description": "Column number in the script (0-based).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "type",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "debuggerStatement",
+ "call",
+ "return"
+ ]
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "continueToLocation",
+ "description": "Continues execution until specific location is reached.",
+ "parameters": [
+ {
+ "name": "location",
+ "description": "Location to continue to.",
+ "$ref": "Location"
+ },
+ {
+ "name": "targetCallFrames",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "any",
+ "current"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "disable",
+ "description": "Disables debugger for given page."
+ },
+ {
+ "name": "enable",
+ "description": "Enables debugger for the given page. Clients should not assume that the debugging has been\nenabled until the result for this command is received.",
+ "returns": [
+ {
+ "name": "debuggerId",
+ "description": "Unique identifier of the debugger.",
+ "experimental": true,
+ "$ref": "Runtime.UniqueDebuggerId"
+ }
+ ]
+ },
+ {
+ "name": "evaluateOnCallFrame",
+ "description": "Evaluates expression on a given call frame.",
+ "parameters": [
+ {
+ "name": "callFrameId",
+ "description": "Call frame identifier to evaluate on.",
+ "$ref": "CallFrameId"
+ },
+ {
+ "name": "expression",
+ "description": "Expression to evaluate.",
+ "type": "string"
+ },
+ {
+ "name": "objectGroup",
+ "description": "String object group name to put result into (allows rapid releasing resulting object handles\nusing `releaseObjectGroup`).",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "includeCommandLineAPI",
+ "description": "Specifies whether command line API should be available to the evaluated expression, defaults\nto false.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "silent",
+ "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause\nexecution. Overrides `setPauseOnException` state.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "returnByValue",
+ "description": "Whether the result is expected to be a JSON object that should be sent by value.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "generatePreview",
+ "description": "Whether preview should be generated for the result.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "throwOnSideEffect",
+ "description": "Whether to throw an exception if side effect cannot be ruled out during evaluation.",
+ "optional": true,
+ "type": "boolean"
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "description": "Object wrapper for the evaluation result.",
+ "$ref": "Runtime.RemoteObject"
+ },
+ {
+ "name": "exceptionDetails",
+ "description": "Exception details.",
+ "optional": true,
+ "$ref": "Runtime.ExceptionDetails"
+ }
+ ]
+ },
+ {
+ "name": "getPossibleBreakpoints",
+ "description": "Returns possible locations for breakpoint. scriptId in start and end range locations should be\nthe same.",
+ "parameters": [
+ {
+ "name": "start",
+ "description": "Start of range to search possible breakpoint locations in.",
+ "$ref": "Location"
+ },
+ {
+ "name": "end",
+ "description": "End of range to search possible breakpoint locations in (excluding). When not specified, end\nof scripts is used as end of range.",
+ "optional": true,
+ "$ref": "Location"
+ },
+ {
+ "name": "restrictToFunction",
+ "description": "Only consider locations which are in the same (non-nested) function as start.",
+ "optional": true,
+ "type": "boolean"
+ }
+ ],
+ "returns": [
+ {
+ "name": "locations",
+ "description": "List of the possible breakpoint locations.",
+ "type": "array",
+ "items": {
+ "$ref": "BreakLocation"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getScriptSource",
+ "description": "Returns source for the script with given id.",
+ "parameters": [
+ {
+ "name": "scriptId",
+ "description": "Id of the script to get source for.",
+ "$ref": "Runtime.ScriptId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "scriptSource",
+ "description": "Script source.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "getStackTrace",
+ "description": "Returns stack trace with given `stackTraceId`.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "stackTraceId",
+ "$ref": "Runtime.StackTraceId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "stackTrace",
+ "$ref": "Runtime.StackTrace"
+ }
+ ]
+ },
+ {
+ "name": "pause",
+ "description": "Stops on the next JavaScript statement."
+ },
+ {
+ "name": "pauseOnAsyncCall",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "parentStackTraceId",
+ "description": "Debugger will pause when async call with given stack trace is started.",
+ "$ref": "Runtime.StackTraceId"
+ }
+ ]
+ },
+ {
+ "name": "removeBreakpoint",
+ "description": "Removes JavaScript breakpoint.",
+ "parameters": [
+ {
+ "name": "breakpointId",
+ "$ref": "BreakpointId"
+ }
+ ]
+ },
+ {
+ "name": "restartFrame",
+ "description": "Restarts particular call frame from the beginning.",
+ "parameters": [
+ {
+ "name": "callFrameId",
+ "description": "Call frame identifier to evaluate on.",
+ "$ref": "CallFrameId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "callFrames",
+ "description": "New stack trace.",
+ "type": "array",
+ "items": {
+ "$ref": "CallFrame"
+ }
+ },
+ {
+ "name": "asyncStackTrace",
+ "description": "Async stack trace, if any.",
+ "optional": true,
+ "$ref": "Runtime.StackTrace"
+ },
+ {
+ "name": "asyncStackTraceId",
+ "description": "Async stack trace, if any.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "Runtime.StackTraceId"
+ }
+ ]
+ },
+ {
+ "name": "resume",
+ "description": "Resumes JavaScript execution."
+ },
+ {
+ "name": "scheduleStepIntoAsync",
+ "description": "This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and\nDebugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled\nbefore next pause. Returns success when async task is actually scheduled, returns error if no\ntask were scheduled or another scheduleStepIntoAsync was called.",
+ "experimental": true
+ },
+ {
+ "name": "searchInContent",
+ "description": "Searches for given string in script content.",
+ "parameters": [
+ {
+ "name": "scriptId",
+ "description": "Id of the script to search in.",
+ "$ref": "Runtime.ScriptId"
+ },
+ {
+ "name": "query",
+ "description": "String to search for.",
+ "type": "string"
+ },
+ {
+ "name": "caseSensitive",
+ "description": "If true, search is case sensitive.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "isRegex",
+ "description": "If true, treats string parameter as regex.",
+ "optional": true,
+ "type": "boolean"
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "description": "List of search matches.",
+ "type": "array",
+ "items": {
+ "$ref": "SearchMatch"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setAsyncCallStackDepth",
+ "description": "Enables or disables async call stacks tracking.",
+ "parameters": [
+ {
+ "name": "maxDepth",
+ "description": "Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async\ncall stacks (default).",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "setBlackboxPatterns",
+ "description": "Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in\nscripts with url matching one of the patterns. VM will try to leave blackboxed script by\nperforming 'step in' several times, finally resorting to 'step out' if unsuccessful.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "patterns",
+ "description": "Array of regexps that will be used to check script url for blackbox state.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setBlackboxedRanges",
+ "description": "Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted\nscripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.\nPositions array contains positions where blackbox state is changed. First interval isn't\nblackboxed. Array should be sorted.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "scriptId",
+ "description": "Id of the script.",
+ "$ref": "Runtime.ScriptId"
+ },
+ {
+ "name": "positions",
+ "type": "array",
+ "items": {
+ "$ref": "ScriptPosition"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setBreakpoint",
+ "description": "Sets JavaScript breakpoint at a given location.",
+ "parameters": [
+ {
+ "name": "location",
+ "description": "Location to set breakpoint in.",
+ "$ref": "Location"
+ },
+ {
+ "name": "condition",
+ "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the\nbreakpoint if this expression evaluates to true.",
+ "optional": true,
+ "type": "string"
+ }
+ ],
+ "returns": [
+ {
+ "name": "breakpointId",
+ "description": "Id of the created breakpoint for further reference.",
+ "$ref": "BreakpointId"
+ },
+ {
+ "name": "actualLocation",
+ "description": "Location this breakpoint resolved into.",
+ "$ref": "Location"
+ }
+ ]
+ },
+ {
+ "name": "setBreakpointByUrl",
+ "description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this\ncommand is issued, all existing parsed scripts will have breakpoints resolved and returned in\n`locations` property. Further matching script parsing will result in subsequent\n`breakpointResolved` events issued. This logical breakpoint will survive page reloads.",
+ "parameters": [
+ {
+ "name": "lineNumber",
+ "description": "Line number to set breakpoint at.",
+ "type": "integer"
+ },
+ {
+ "name": "url",
+ "description": "URL of the resources to set breakpoint on.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "urlRegex",
+ "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or\n`urlRegex` must be specified.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "scriptHash",
+ "description": "Script hash of the resources to set breakpoint on.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "columnNumber",
+ "description": "Offset in the line to set breakpoint at.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "condition",
+ "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the\nbreakpoint if this expression evaluates to true.",
+ "optional": true,
+ "type": "string"
+ }
+ ],
+ "returns": [
+ {
+ "name": "breakpointId",
+ "description": "Id of the created breakpoint for further reference.",
+ "$ref": "BreakpointId"
+ },
+ {
+ "name": "locations",
+ "description": "List of the locations this breakpoint resolved into upon addition.",
+ "type": "array",
+ "items": {
+ "$ref": "Location"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setBreakpointsActive",
+ "description": "Activates / deactivates all breakpoints on the page.",
+ "parameters": [
+ {
+ "name": "active",
+ "description": "New value for breakpoints active state.",
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "setPauseOnExceptions",
+ "description": "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or\nno exceptions. Initial pause on exceptions state is `none`.",
+ "parameters": [
+ {
+ "name": "state",
+ "description": "Pause on exceptions mode.",
+ "type": "string",
+ "enum": [
+ "none",
+ "uncaught",
+ "all"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "setReturnValue",
+ "description": "Changes return value in top frame. Available only at return break position.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "newValue",
+ "description": "New return value.",
+ "$ref": "Runtime.CallArgument"
+ }
+ ]
+ },
+ {
+ "name": "setScriptSource",
+ "description": "Edits JavaScript source live.",
+ "parameters": [
+ {
+ "name": "scriptId",
+ "description": "Id of the script to edit.",
+ "$ref": "Runtime.ScriptId"
+ },
+ {
+ "name": "scriptSource",
+ "description": "New content of the script.",
+ "type": "string"
+ },
+ {
+ "name": "dryRun",
+ "description": "If true the change will not actually be applied. Dry run may be used to get result\ndescription without actually modifying the code.",
+ "optional": true,
+ "type": "boolean"
+ }
+ ],
+ "returns": [
+ {
+ "name": "callFrames",
+ "description": "New stack trace in case editing has happened while VM was stopped.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "CallFrame"
+ }
+ },
+ {
+ "name": "stackChanged",
+ "description": "Whether current call stack was modified after applying the changes.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "asyncStackTrace",
+ "description": "Async stack trace, if any.",
+ "optional": true,
+ "$ref": "Runtime.StackTrace"
+ },
+ {
+ "name": "asyncStackTraceId",
+ "description": "Async stack trace, if any.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "Runtime.StackTraceId"
+ },
+ {
+ "name": "exceptionDetails",
+ "description": "Exception details if any.",
+ "optional": true,
+ "$ref": "Runtime.ExceptionDetails"
+ }
+ ]
+ },
+ {
+ "name": "setSkipAllPauses",
+ "description": "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).",
+ "parameters": [
+ {
+ "name": "skip",
+ "description": "New value for skip pauses state.",
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "setVariableValue",
+ "description": "Changes value of variable in a callframe. Object-based scopes are not supported and must be\nmutated manually.",
+ "parameters": [
+ {
+ "name": "scopeNumber",
+ "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'\nscope types are allowed. Other scopes could be manipulated manually.",
+ "type": "integer"
+ },
+ {
+ "name": "variableName",
+ "description": "Variable name.",
+ "type": "string"
+ },
+ {
+ "name": "newValue",
+ "description": "New variable value.",
+ "$ref": "Runtime.CallArgument"
+ },
+ {
+ "name": "callFrameId",
+ "description": "Id of callframe that holds variable.",
+ "$ref": "CallFrameId"
+ }
+ ]
+ },
+ {
+ "name": "stepInto",
+ "description": "Steps into the function call.",
+ "parameters": [
+ {
+ "name": "breakOnAsyncCall",
+ "description": "Debugger will issue additional Debugger.paused notification if any async task is scheduled\nbefore next pause.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "stepOut",
+ "description": "Steps out of the function call."
+ },
+ {
+ "name": "stepOver",
+ "description": "Steps over the statement."
+ }
+ ],
+ "events": [
+ {
+ "name": "breakpointResolved",
+ "description": "Fired when breakpoint is resolved to an actual script and location.",
+ "parameters": [
+ {
+ "name": "breakpointId",
+ "description": "Breakpoint unique identifier.",
+ "$ref": "BreakpointId"
+ },
+ {
+ "name": "location",
+ "description": "Actual breakpoint location.",
+ "$ref": "Location"
+ }
+ ]
+ },
+ {
+ "name": "paused",
+ "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.",
+ "parameters": [
+ {
+ "name": "callFrames",
+ "description": "Call stack the virtual machine stopped on.",
+ "type": "array",
+ "items": {
+ "$ref": "CallFrame"
+ }
+ },
+ {
+ "name": "reason",
+ "description": "Pause reason.",
+ "type": "string",
+ "enum": [
+ "XHR",
+ "DOM",
+ "EventListener",
+ "exception",
+ "assert",
+ "debugCommand",
+ "promiseRejection",
+ "OOM",
+ "other",
+ "ambiguous"
+ ]
+ },
+ {
+ "name": "data",
+ "description": "Object containing break-specific auxiliary properties.",
+ "optional": true,
+ "type": "object"
+ },
+ {
+ "name": "hitBreakpoints",
+ "description": "Hit breakpoints IDs",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "asyncStackTrace",
+ "description": "Async stack trace, if any.",
+ "optional": true,
+ "$ref": "Runtime.StackTrace"
+ },
+ {
+ "name": "asyncStackTraceId",
+ "description": "Async stack trace, if any.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "Runtime.StackTraceId"
+ },
+ {
+ "name": "asyncCallStackTraceId",
+ "description": "Just scheduled async call will have this stack trace as parent stack during async execution.\nThis field is available only after `Debugger.stepInto` call with `breakOnAsynCall` flag.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "Runtime.StackTraceId"
+ }
+ ]
+ },
+ {
+ "name": "resumed",
+ "description": "Fired when the virtual machine resumed execution."
+ },
+ {
+ "name": "scriptFailedToParse",
+ "description": "Fired when virtual machine fails to parse the script.",
+ "parameters": [
+ {
+ "name": "scriptId",
+ "description": "Identifier of the script parsed.",
+ "$ref": "Runtime.ScriptId"
+ },
+ {
+ "name": "url",
+ "description": "URL or name of the script parsed (if any).",
+ "type": "string"
+ },
+ {
+ "name": "startLine",
+ "description": "Line offset of the script within the resource with given URL (for script tags).",
+ "type": "integer"
+ },
+ {
+ "name": "startColumn",
+ "description": "Column offset of the script within the resource with given URL.",
+ "type": "integer"
+ },
+ {
+ "name": "endLine",
+ "description": "Last line of the script.",
+ "type": "integer"
+ },
+ {
+ "name": "endColumn",
+ "description": "Length of the last line of the script.",
+ "type": "integer"
+ },
+ {
+ "name": "executionContextId",
+ "description": "Specifies script creation context.",
+ "$ref": "Runtime.ExecutionContextId"
+ },
+ {
+ "name": "hash",
+ "description": "Content hash of the script.",
+ "type": "string"
+ },
+ {
+ "name": "executionContextAuxData",
+ "description": "Embedder-specific auxiliary data.",
+ "optional": true,
+ "type": "object"
+ },
+ {
+ "name": "sourceMapURL",
+ "description": "URL of source map associated with script (if any).",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "hasSourceURL",
+ "description": "True, if this script has sourceURL.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "isModule",
+ "description": "True, if this script is ES6 module.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "length",
+ "description": "This script length.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "stackTrace",
+ "description": "JavaScript top stack frame of where the script parsed event was triggered if available.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "Runtime.StackTrace"
+ }
+ ]
+ },
+ {
+ "name": "scriptParsed",
+ "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected\nscripts upon enabling debugger.",
+ "parameters": [
+ {
+ "name": "scriptId",
+ "description": "Identifier of the script parsed.",
+ "$ref": "Runtime.ScriptId"
+ },
+ {
+ "name": "url",
+ "description": "URL or name of the script parsed (if any).",
+ "type": "string"
+ },
+ {
+ "name": "startLine",
+ "description": "Line offset of the script within the resource with given URL (for script tags).",
+ "type": "integer"
+ },
+ {
+ "name": "startColumn",
+ "description": "Column offset of the script within the resource with given URL.",
+ "type": "integer"
+ },
+ {
+ "name": "endLine",
+ "description": "Last line of the script.",
+ "type": "integer"
+ },
+ {
+ "name": "endColumn",
+ "description": "Length of the last line of the script.",
+ "type": "integer"
+ },
+ {
+ "name": "executionContextId",
+ "description": "Specifies script creation context.",
+ "$ref": "Runtime.ExecutionContextId"
+ },
+ {
+ "name": "hash",
+ "description": "Content hash of the script.",
+ "type": "string"
+ },
+ {
+ "name": "executionContextAuxData",
+ "description": "Embedder-specific auxiliary data.",
+ "optional": true,
+ "type": "object"
+ },
+ {
+ "name": "isLiveEdit",
+ "description": "True, if this script is generated as a result of the live edit operation.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "sourceMapURL",
+ "description": "URL of source map associated with script (if any).",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "hasSourceURL",
+ "description": "True, if this script has sourceURL.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "isModule",
+ "description": "True, if this script is ES6 module.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "length",
+ "description": "This script length.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "stackTrace",
+ "description": "JavaScript top stack frame of where the script parsed event was triggered if available.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "Runtime.StackTrace"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "HeapProfiler",
+ "experimental": true,
+ "dependencies": [
+ "Runtime"
+ ],
+ "types": [
+ {
+ "id": "HeapSnapshotObjectId",
+ "description": "Heap snapshot object id.",
+ "type": "string"
+ },
+ {
+ "id": "SamplingHeapProfileNode",
+ "description": "Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "callFrame",
+ "description": "Function location.",
+ "$ref": "Runtime.CallFrame"
+ },
+ {
+ "name": "selfSize",
+ "description": "Allocations size in bytes for the node excluding children.",
+ "type": "number"
+ },
+ {
+ "name": "children",
+ "description": "Child nodes.",
+ "type": "array",
+ "items": {
+ "$ref": "SamplingHeapProfileNode"
+ }
+ }
+ ]
+ },
+ {
+ "id": "SamplingHeapProfile",
+ "description": "Profile.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "head",
+ "$ref": "SamplingHeapProfileNode"
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "addInspectedHeapObject",
+ "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details\n$x functions).",
+ "parameters": [
+ {
+ "name": "heapObjectId",
+ "description": "Heap snapshot object id to be accessible by means of $x command line API.",
+ "$ref": "HeapSnapshotObjectId"
+ }
+ ]
+ },
+ {
+ "name": "collectGarbage"
+ },
+ {
+ "name": "disable"
+ },
+ {
+ "name": "enable"
+ },
+ {
+ "name": "getHeapObjectId",
+ "parameters": [
+ {
+ "name": "objectId",
+ "description": "Identifier of the object to get heap object id for.",
+ "$ref": "Runtime.RemoteObjectId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "heapSnapshotObjectId",
+ "description": "Id of the heap snapshot object corresponding to the passed remote object id.",
+ "$ref": "HeapSnapshotObjectId"
+ }
+ ]
+ },
+ {
+ "name": "getObjectByHeapObjectId",
+ "parameters": [
+ {
+ "name": "objectId",
+ "$ref": "HeapSnapshotObjectId"
+ },
+ {
+ "name": "objectGroup",
+ "description": "Symbolic group name that can be used to release multiple objects.",
+ "optional": true,
+ "type": "string"
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "description": "Evaluation result.",
+ "$ref": "Runtime.RemoteObject"
+ }
+ ]
+ },
+ {
+ "name": "getSamplingProfile",
+ "returns": [
+ {
+ "name": "profile",
+ "description": "Return the sampling profile being collected.",
+ "$ref": "SamplingHeapProfile"
+ }
+ ]
+ },
+ {
+ "name": "startSampling",
+ "parameters": [
+ {
+ "name": "samplingInterval",
+ "description": "Average sample interval in bytes. Poisson distribution is used for the intervals. The\ndefault value is 32768 bytes.",
+ "optional": true,
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "name": "startTrackingHeapObjects",
+ "parameters": [
+ {
+ "name": "trackAllocations",
+ "optional": true,
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "stopSampling",
+ "returns": [
+ {
+ "name": "profile",
+ "description": "Recorded sampling heap profile.",
+ "$ref": "SamplingHeapProfile"
+ }
+ ]
+ },
+ {
+ "name": "stopTrackingHeapObjects",
+ "parameters": [
+ {
+ "name": "reportProgress",
+ "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken\nwhen the tracking is stopped.",
+ "optional": true,
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "takeHeapSnapshot",
+ "parameters": [
+ {
+ "name": "reportProgress",
+ "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.",
+ "optional": true,
+ "type": "boolean"
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "addHeapSnapshotChunk",
+ "parameters": [
+ {
+ "name": "chunk",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "heapStatsUpdate",
+ "description": "If heap objects tracking has been started then backend may send update for one or more fragments",
+ "parameters": [
+ {
+ "name": "statsUpdate",
+ "description": "An array of triplets. Each triplet describes a fragment. The first integer is the fragment\nindex, the second integer is a total count of objects for the fragment, the third integer is\na total size of the objects for the fragment.",
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ }
+ ]
+ },
+ {
+ "name": "lastSeenObjectId",
+ "description": "If heap objects tracking has been started then backend regularly sends a current value for last\nseen object id and corresponding timestamp. If the were changes in the heap since last event\nthen one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.",
+ "parameters": [
+ {
+ "name": "lastSeenObjectId",
+ "type": "integer"
+ },
+ {
+ "name": "timestamp",
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "name": "reportHeapSnapshotProgress",
+ "parameters": [
+ {
+ "name": "done",
+ "type": "integer"
+ },
+ {
+ "name": "total",
+ "type": "integer"
+ },
+ {
+ "name": "finished",
+ "optional": true,
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "resetProfiles"
+ }
+ ]
+ },
+ {
+ "domain": "Profiler",
+ "dependencies": [
+ "Runtime",
+ "Debugger"
+ ],
+ "types": [
+ {
+ "id": "ProfileNode",
+ "description": "Profile node. Holds callsite information, execution statistics and child nodes.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "id",
+ "description": "Unique id of the node.",
+ "type": "integer"
+ },
+ {
+ "name": "callFrame",
+ "description": "Function location.",
+ "$ref": "Runtime.CallFrame"
+ },
+ {
+ "name": "hitCount",
+ "description": "Number of samples where this node was on top of the call stack.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "children",
+ "description": "Child node ids.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ {
+ "name": "deoptReason",
+ "description": "The reason of being not optimized. The function may be deoptimized or marked as don't\noptimize.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "positionTicks",
+ "description": "An array of source position ticks.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "PositionTickInfo"
+ }
+ }
+ ]
+ },
+ {
+ "id": "Profile",
+ "description": "Profile.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "nodes",
+ "description": "The list of profile nodes. First item is the root node.",
+ "type": "array",
+ "items": {
+ "$ref": "ProfileNode"
+ }
+ },
+ {
+ "name": "startTime",
+ "description": "Profiling start timestamp in microseconds.",
+ "type": "number"
+ },
+ {
+ "name": "endTime",
+ "description": "Profiling end timestamp in microseconds.",
+ "type": "number"
+ },
+ {
+ "name": "samples",
+ "description": "Ids of samples top nodes.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ {
+ "name": "timeDeltas",
+ "description": "Time intervals between adjacent samples in microseconds. The first delta is relative to the\nprofile startTime.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ }
+ ]
+ },
+ {
+ "id": "PositionTickInfo",
+ "description": "Specifies a number of samples attributed to a certain source position.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "line",
+ "description": "Source line number (1-based).",
+ "type": "integer"
+ },
+ {
+ "name": "ticks",
+ "description": "Number of samples attributed to the source line.",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "id": "CoverageRange",
+ "description": "Coverage data for a source range.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "startOffset",
+ "description": "JavaScript script source offset for the range start.",
+ "type": "integer"
+ },
+ {
+ "name": "endOffset",
+ "description": "JavaScript script source offset for the range end.",
+ "type": "integer"
+ },
+ {
+ "name": "count",
+ "description": "Collected execution count of the source range.",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "id": "FunctionCoverage",
+ "description": "Coverage data for a JavaScript function.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "functionName",
+ "description": "JavaScript function name.",
+ "type": "string"
+ },
+ {
+ "name": "ranges",
+ "description": "Source ranges inside the function with coverage data.",
+ "type": "array",
+ "items": {
+ "$ref": "CoverageRange"
+ }
+ },
+ {
+ "name": "isBlockCoverage",
+ "description": "Whether coverage data for this function has block granularity.",
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "id": "ScriptCoverage",
+ "description": "Coverage data for a JavaScript script.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "scriptId",
+ "description": "JavaScript script id.",
+ "$ref": "Runtime.ScriptId"
+ },
+ {
+ "name": "url",
+ "description": "JavaScript script name or url.",
+ "type": "string"
+ },
+ {
+ "name": "functions",
+ "description": "Functions contained in the script that has coverage data.",
+ "type": "array",
+ "items": {
+ "$ref": "FunctionCoverage"
+ }
+ }
+ ]
+ },
+ {
+ "id": "TypeObject",
+ "description": "Describes a type collected during runtime.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "name",
+ "description": "Name of a type collected with type profiling.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "id": "TypeProfileEntry",
+ "description": "Source offset and types for a parameter or return value.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "offset",
+ "description": "Source offset of the parameter or end of function for return values.",
+ "type": "integer"
+ },
+ {
+ "name": "types",
+ "description": "The types for this parameter or return value.",
+ "type": "array",
+ "items": {
+ "$ref": "TypeObject"
+ }
+ }
+ ]
+ },
+ {
+ "id": "ScriptTypeProfile",
+ "description": "Type profile data collected during runtime for a JavaScript script.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "scriptId",
+ "description": "JavaScript script id.",
+ "$ref": "Runtime.ScriptId"
+ },
+ {
+ "name": "url",
+ "description": "JavaScript script name or url.",
+ "type": "string"
+ },
+ {
+ "name": "entries",
+ "description": "Type profile entries for parameters and return values of the functions in the script.",
+ "type": "array",
+ "items": {
+ "$ref": "TypeProfileEntry"
+ }
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "disable"
+ },
+ {
+ "name": "enable"
+ },
+ {
+ "name": "getBestEffortCoverage",
+ "description": "Collect coverage data for the current isolate. The coverage data may be incomplete due to\ngarbage collection.",
+ "returns": [
+ {
+ "name": "result",
+ "description": "Coverage data for the current isolate.",
+ "type": "array",
+ "items": {
+ "$ref": "ScriptCoverage"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setSamplingInterval",
+ "description": "Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.",
+ "parameters": [
+ {
+ "name": "interval",
+ "description": "New sampling interval in microseconds.",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "start"
+ },
+ {
+ "name": "startPreciseCoverage",
+ "description": "Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code\ncoverage may be incomplete. Enabling prevents running optimized code and resets execution\ncounters.",
+ "parameters": [
+ {
+ "name": "callCount",
+ "description": "Collect accurate call counts beyond simple 'covered' or 'not covered'.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "detailed",
+ "description": "Collect block-based coverage.",
+ "optional": true,
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "startTypeProfile",
+ "description": "Enable type profile.",
+ "experimental": true
+ },
+ {
+ "name": "stop",
+ "returns": [
+ {
+ "name": "profile",
+ "description": "Recorded profile.",
+ "$ref": "Profile"
+ }
+ ]
+ },
+ {
+ "name": "stopPreciseCoverage",
+ "description": "Disable precise code coverage. Disabling releases unnecessary execution count records and allows\nexecuting optimized code."
+ },
+ {
+ "name": "stopTypeProfile",
+ "description": "Disable type profile. Disabling releases type profile data collected so far.",
+ "experimental": true
+ },
+ {
+ "name": "takePreciseCoverage",
+ "description": "Collect coverage data for the current isolate, and resets execution counters. Precise code\ncoverage needs to have started.",
+ "returns": [
+ {
+ "name": "result",
+ "description": "Coverage data for the current isolate.",
+ "type": "array",
+ "items": {
+ "$ref": "ScriptCoverage"
+ }
+ }
+ ]
+ },
+ {
+ "name": "takeTypeProfile",
+ "description": "Collect type profile.",
+ "experimental": true,
+ "returns": [
+ {
+ "name": "result",
+ "description": "Type profile for all scripts since startTypeProfile() was turned on.",
+ "type": "array",
+ "items": {
+ "$ref": "ScriptTypeProfile"
+ }
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "consoleProfileFinished",
+ "parameters": [
+ {
+ "name": "id",
+ "type": "string"
+ },
+ {
+ "name": "location",
+ "description": "Location of console.profileEnd().",
+ "$ref": "Debugger.Location"
+ },
+ {
+ "name": "profile",
+ "$ref": "Profile"
+ },
+ {
+ "name": "title",
+ "description": "Profile title passed as an argument to console.profile().",
+ "optional": true,
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "consoleProfileStarted",
+ "description": "Sent when new profile recording is started using console.profile() call.",
+ "parameters": [
+ {
+ "name": "id",
+ "type": "string"
+ },
+ {
+ "name": "location",
+ "description": "Location of console.profile().",
+ "$ref": "Debugger.Location"
+ },
+ {
+ "name": "title",
+ "description": "Profile title passed as an argument to console.profile().",
+ "optional": true,
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "Runtime",
+ "description": "Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects.\nEvaluation results are returned as mirror object that expose object type, string representation\nand unique identifier that can be used for further object reference. Original objects are\nmaintained in memory unless they are either explicitly released or are released along with the\nother objects in their object group.",
+ "types": [
+ {
+ "id": "ScriptId",
+ "description": "Unique script identifier.",
+ "type": "string"
+ },
+ {
+ "id": "RemoteObjectId",
+ "description": "Unique object identifier.",
+ "type": "string"
+ },
+ {
+ "id": "UnserializableValue",
+ "description": "Primitive value which cannot be JSON-stringified.",
+ "type": "string",
+ "enum": [
+ "Infinity",
+ "NaN",
+ "-Infinity",
+ "-0"
+ ]
+ },
+ {
+ "id": "RemoteObject",
+ "description": "Mirror object referencing original JavaScript object.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "type",
+ "description": "Object type.",
+ "type": "string",
+ "enum": [
+ "object",
+ "function",
+ "undefined",
+ "string",
+ "number",
+ "boolean",
+ "symbol"
+ ]
+ },
+ {
+ "name": "subtype",
+ "description": "Object subtype hint. Specified for `object` type values only.",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "array",
+ "null",
+ "node",
+ "regexp",
+ "date",
+ "map",
+ "set",
+ "weakmap",
+ "weakset",
+ "iterator",
+ "generator",
+ "error",
+ "proxy",
+ "promise",
+ "typedarray"
+ ]
+ },
+ {
+ "name": "className",
+ "description": "Object class (constructor) name. Specified for `object` type values only.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "description": "Remote object value in case of primitive values or JSON values (if it was requested).",
+ "optional": true,
+ "type": "any"
+ },
+ {
+ "name": "unserializableValue",
+ "description": "Primitive value which can not be JSON-stringified does not have `value`, but gets this\nproperty.",
+ "optional": true,
+ "$ref": "UnserializableValue"
+ },
+ {
+ "name": "description",
+ "description": "String representation of the object.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "objectId",
+ "description": "Unique object identifier (for non-primitive values).",
+ "optional": true,
+ "$ref": "RemoteObjectId"
+ },
+ {
+ "name": "preview",
+ "description": "Preview containing abbreviated property values. Specified for `object` type values only.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "ObjectPreview"
+ },
+ {
+ "name": "customPreview",
+ "experimental": true,
+ "optional": true,
+ "$ref": "CustomPreview"
+ }
+ ]
+ },
+ {
+ "id": "CustomPreview",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "header",
+ "type": "string"
+ },
+ {
+ "name": "hasBody",
+ "type": "boolean"
+ },
+ {
+ "name": "formatterObjectId",
+ "$ref": "RemoteObjectId"
+ },
+ {
+ "name": "bindRemoteObjectFunctionId",
+ "$ref": "RemoteObjectId"
+ },
+ {
+ "name": "configObjectId",
+ "optional": true,
+ "$ref": "RemoteObjectId"
+ }
+ ]
+ },
+ {
+ "id": "ObjectPreview",
+ "description": "Object containing abbreviated remote object value.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "type",
+ "description": "Object type.",
+ "type": "string",
+ "enum": [
+ "object",
+ "function",
+ "undefined",
+ "string",
+ "number",
+ "boolean",
+ "symbol"
+ ]
+ },
+ {
+ "name": "subtype",
+ "description": "Object subtype hint. Specified for `object` type values only.",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "array",
+ "null",
+ "node",
+ "regexp",
+ "date",
+ "map",
+ "set",
+ "weakmap",
+ "weakset",
+ "iterator",
+ "generator",
+ "error"
+ ]
+ },
+ {
+ "name": "description",
+ "description": "String representation of the object.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "overflow",
+ "description": "True iff some of the properties or entries of the original object did not fit.",
+ "type": "boolean"
+ },
+ {
+ "name": "properties",
+ "description": "List of the properties.",
+ "type": "array",
+ "items": {
+ "$ref": "PropertyPreview"
+ }
+ },
+ {
+ "name": "entries",
+ "description": "List of the entries. Specified for `map` and `set` subtype values only.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "EntryPreview"
+ }
+ }
+ ]
+ },
+ {
+ "id": "PropertyPreview",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "name",
+ "description": "Property name.",
+ "type": "string"
+ },
+ {
+ "name": "type",
+ "description": "Object type. Accessor means that the property itself is an accessor property.",
+ "type": "string",
+ "enum": [
+ "object",
+ "function",
+ "undefined",
+ "string",
+ "number",
+ "boolean",
+ "symbol",
+ "accessor"
+ ]
+ },
+ {
+ "name": "value",
+ "description": "User-friendly property value string.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "valuePreview",
+ "description": "Nested value preview.",
+ "optional": true,
+ "$ref": "ObjectPreview"
+ },
+ {
+ "name": "subtype",
+ "description": "Object subtype hint. Specified for `object` type values only.",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "array",
+ "null",
+ "node",
+ "regexp",
+ "date",
+ "map",
+ "set",
+ "weakmap",
+ "weakset",
+ "iterator",
+ "generator",
+ "error"
+ ]
+ }
+ ]
+ },
+ {
+ "id": "EntryPreview",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "key",
+ "description": "Preview of the key. Specified for map-like collection entries.",
+ "optional": true,
+ "$ref": "ObjectPreview"
+ },
+ {
+ "name": "value",
+ "description": "Preview of the value.",
+ "$ref": "ObjectPreview"
+ }
+ ]
+ },
+ {
+ "id": "PropertyDescriptor",
+ "description": "Object property descriptor.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "name",
+ "description": "Property name or symbol description.",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "description": "The value associated with the property.",
+ "optional": true,
+ "$ref": "RemoteObject"
+ },
+ {
+ "name": "writable",
+ "description": "True if the value associated with the property may be changed (data descriptors only).",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "get",
+ "description": "A function which serves as a getter for the property, or `undefined` if there is no getter\n(accessor descriptors only).",
+ "optional": true,
+ "$ref": "RemoteObject"
+ },
+ {
+ "name": "set",
+ "description": "A function which serves as a setter for the property, or `undefined` if there is no setter\n(accessor descriptors only).",
+ "optional": true,
+ "$ref": "RemoteObject"
+ },
+ {
+ "name": "configurable",
+ "description": "True if the type of this property descriptor may be changed and if the property may be\ndeleted from the corresponding object.",
+ "type": "boolean"
+ },
+ {
+ "name": "enumerable",
+ "description": "True if this property shows up during enumeration of the properties on the corresponding\nobject.",
+ "type": "boolean"
+ },
+ {
+ "name": "wasThrown",
+ "description": "True if the result was thrown during the evaluation.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "isOwn",
+ "description": "True if the property is owned for the object.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "symbol",
+ "description": "Property symbol object, if the property is of the `symbol` type.",
+ "optional": true,
+ "$ref": "RemoteObject"
+ }
+ ]
+ },
+ {
+ "id": "InternalPropertyDescriptor",
+ "description": "Object internal property descriptor. This property isn't normally visible in JavaScript code.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "name",
+ "description": "Conventional property name.",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "description": "The value associated with the property.",
+ "optional": true,
+ "$ref": "RemoteObject"
+ }
+ ]
+ },
+ {
+ "id": "CallArgument",
+ "description": "Represents function call argument. Either remote object id `objectId`, primitive `value`,\nunserializable primitive value or neither of (for undefined) them should be specified.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "value",
+ "description": "Primitive value or serializable javascript object.",
+ "optional": true,
+ "type": "any"
+ },
+ {
+ "name": "unserializableValue",
+ "description": "Primitive value which can not be JSON-stringified.",
+ "optional": true,
+ "$ref": "UnserializableValue"
+ },
+ {
+ "name": "objectId",
+ "description": "Remote object handle.",
+ "optional": true,
+ "$ref": "RemoteObjectId"
+ }
+ ]
+ },
+ {
+ "id": "ExecutionContextId",
+ "description": "Id of an execution context.",
+ "type": "integer"
+ },
+ {
+ "id": "ExecutionContextDescription",
+ "description": "Description of an isolated world.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "id",
+ "description": "Unique id of the execution context. It can be used to specify in which execution context\nscript evaluation should be performed.",
+ "$ref": "ExecutionContextId"
+ },
+ {
+ "name": "origin",
+ "description": "Execution context origin.",
+ "type": "string"
+ },
+ {
+ "name": "name",
+ "description": "Human readable name describing given context.",
+ "type": "string"
+ },
+ {
+ "name": "auxData",
+ "description": "Embedder-specific auxiliary data.",
+ "optional": true,
+ "type": "object"
+ }
+ ]
+ },
+ {
+ "id": "ExceptionDetails",
+ "description": "Detailed information about exception (or error) that was thrown during script compilation or\nexecution.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "exceptionId",
+ "description": "Exception id.",
+ "type": "integer"
+ },
+ {
+ "name": "text",
+ "description": "Exception text, which should be used together with exception object when available.",
+ "type": "string"
+ },
+ {
+ "name": "lineNumber",
+ "description": "Line number of the exception location (0-based).",
+ "type": "integer"
+ },
+ {
+ "name": "columnNumber",
+ "description": "Column number of the exception location (0-based).",
+ "type": "integer"
+ },
+ {
+ "name": "scriptId",
+ "description": "Script ID of the exception location.",
+ "optional": true,
+ "$ref": "ScriptId"
+ },
+ {
+ "name": "url",
+ "description": "URL of the exception location, to be used when the script was not reported.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "stackTrace",
+ "description": "JavaScript stack trace if available.",
+ "optional": true,
+ "$ref": "StackTrace"
+ },
+ {
+ "name": "exception",
+ "description": "Exception object if available.",
+ "optional": true,
+ "$ref": "RemoteObject"
+ },
+ {
+ "name": "executionContextId",
+ "description": "Identifier of the context where exception happened.",
+ "optional": true,
+ "$ref": "ExecutionContextId"
+ }
+ ]
+ },
+ {
+ "id": "Timestamp",
+ "description": "Number of milliseconds since epoch.",
+ "type": "number"
+ },
+ {
+ "id": "CallFrame",
+ "description": "Stack entry for runtime errors and assertions.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "functionName",
+ "description": "JavaScript function name.",
+ "type": "string"
+ },
+ {
+ "name": "scriptId",
+ "description": "JavaScript script id.",
+ "$ref": "ScriptId"
+ },
+ {
+ "name": "url",
+ "description": "JavaScript script name or url.",
+ "type": "string"
+ },
+ {
+ "name": "lineNumber",
+ "description": "JavaScript script line number (0-based).",
+ "type": "integer"
+ },
+ {
+ "name": "columnNumber",
+ "description": "JavaScript script column number (0-based).",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "id": "StackTrace",
+ "description": "Call frames for assertions or error messages.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "description",
+ "description": "String label of this stack trace. For async traces this may be a name of the function that\ninitiated the async call.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "callFrames",
+ "description": "JavaScript function name.",
+ "type": "array",
+ "items": {
+ "$ref": "CallFrame"
+ }
+ },
+ {
+ "name": "parent",
+ "description": "Asynchronous JavaScript stack trace that preceded this stack, if available.",
+ "optional": true,
+ "$ref": "StackTrace"
+ },
+ {
+ "name": "parentId",
+ "description": "Asynchronous JavaScript stack trace that preceded this stack, if available.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "StackTraceId"
+ }
+ ]
+ },
+ {
+ "id": "UniqueDebuggerId",
+ "description": "Unique identifier of current debugger.",
+ "experimental": true,
+ "type": "string"
+ },
+ {
+ "id": "StackTraceId",
+ "description": "If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This\nallows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "id",
+ "type": "string"
+ },
+ {
+ "name": "debuggerId",
+ "optional": true,
+ "$ref": "UniqueDebuggerId"
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "awaitPromise",
+ "description": "Add handler to promise with given promise object id.",
+ "parameters": [
+ {
+ "name": "promiseObjectId",
+ "description": "Identifier of the promise.",
+ "$ref": "RemoteObjectId"
+ },
+ {
+ "name": "returnByValue",
+ "description": "Whether the result is expected to be a JSON object that should be sent by value.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "generatePreview",
+ "description": "Whether preview should be generated for the result.",
+ "optional": true,
+ "type": "boolean"
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "description": "Promise result. Will contain rejected value if promise was rejected.",
+ "$ref": "RemoteObject"
+ },
+ {
+ "name": "exceptionDetails",
+ "description": "Exception details if stack strace is available.",
+ "optional": true,
+ "$ref": "ExceptionDetails"
+ }
+ ]
+ },
+ {
+ "name": "callFunctionOn",
+ "description": "Calls function with given declaration on the given object. Object group of the result is\ninherited from the target object.",
+ "parameters": [
+ {
+ "name": "functionDeclaration",
+ "description": "Declaration of the function to call.",
+ "type": "string"
+ },
+ {
+ "name": "objectId",
+ "description": "Identifier of the object to call function on. Either objectId or executionContextId should\nbe specified.",
+ "optional": true,
+ "$ref": "RemoteObjectId"
+ },
+ {
+ "name": "arguments",
+ "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target\nobject.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "CallArgument"
+ }
+ },
+ {
+ "name": "silent",
+ "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause\nexecution. Overrides `setPauseOnException` state.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "returnByValue",
+ "description": "Whether the result is expected to be a JSON object which should be sent by value.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "generatePreview",
+ "description": "Whether preview should be generated for the result.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "userGesture",
+ "description": "Whether execution should be treated as initiated by user in the UI.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "awaitPromise",
+ "description": "Whether execution should `await` for resulting value and return once awaited promise is\nresolved.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "executionContextId",
+ "description": "Specifies execution context which global object will be used to call function on. Either\nexecutionContextId or objectId should be specified.",
+ "optional": true,
+ "$ref": "ExecutionContextId"
+ },
+ {
+ "name": "objectGroup",
+ "description": "Symbolic group name that can be used to release multiple objects. If objectGroup is not\nspecified and objectId is, objectGroup will be inherited from object.",
+ "optional": true,
+ "type": "string"
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "description": "Call result.",
+ "$ref": "RemoteObject"
+ },
+ {
+ "name": "exceptionDetails",
+ "description": "Exception details.",
+ "optional": true,
+ "$ref": "ExceptionDetails"
+ }
+ ]
+ },
+ {
+ "name": "compileScript",
+ "description": "Compiles expression.",
+ "parameters": [
+ {
+ "name": "expression",
+ "description": "Expression to compile.",
+ "type": "string"
+ },
+ {
+ "name": "sourceURL",
+ "description": "Source url to be set for the script.",
+ "type": "string"
+ },
+ {
+ "name": "persistScript",
+ "description": "Specifies whether the compiled script should be persisted.",
+ "type": "boolean"
+ },
+ {
+ "name": "executionContextId",
+ "description": "Specifies in which execution context to perform script run. If the parameter is omitted the\nevaluation will be performed in the context of the inspected page.",
+ "optional": true,
+ "$ref": "ExecutionContextId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "scriptId",
+ "description": "Id of the script.",
+ "optional": true,
+ "$ref": "ScriptId"
+ },
+ {
+ "name": "exceptionDetails",
+ "description": "Exception details.",
+ "optional": true,
+ "$ref": "ExceptionDetails"
+ }
+ ]
+ },
+ {
+ "name": "disable",
+ "description": "Disables reporting of execution contexts creation."
+ },
+ {
+ "name": "discardConsoleEntries",
+ "description": "Discards collected exceptions and console API calls."
+ },
+ {
+ "name": "enable",
+ "description": "Enables reporting of execution contexts creation by means of `executionContextCreated` event.\nWhen the reporting gets enabled the event will be sent immediately for each existing execution\ncontext."
+ },
+ {
+ "name": "evaluate",
+ "description": "Evaluates expression on global object.",
+ "parameters": [
+ {
+ "name": "expression",
+ "description": "Expression to evaluate.",
+ "type": "string"
+ },
+ {
+ "name": "objectGroup",
+ "description": "Symbolic group name that can be used to release multiple objects.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "includeCommandLineAPI",
+ "description": "Determines whether Command Line API should be available during the evaluation.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "silent",
+ "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause\nexecution. Overrides `setPauseOnException` state.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "contextId",
+ "description": "Specifies in which execution context to perform evaluation. If the parameter is omitted the\nevaluation will be performed in the context of the inspected page.",
+ "optional": true,
+ "$ref": "ExecutionContextId"
+ },
+ {
+ "name": "returnByValue",
+ "description": "Whether the result is expected to be a JSON object that should be sent by value.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "generatePreview",
+ "description": "Whether preview should be generated for the result.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "userGesture",
+ "description": "Whether execution should be treated as initiated by user in the UI.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "awaitPromise",
+ "description": "Whether execution should `await` for resulting value and return once awaited promise is\nresolved.",
+ "optional": true,
+ "type": "boolean"
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "description": "Evaluation result.",
+ "$ref": "RemoteObject"
+ },
+ {
+ "name": "exceptionDetails",
+ "description": "Exception details.",
+ "optional": true,
+ "$ref": "ExceptionDetails"
+ }
+ ]
+ },
+ {
+ "name": "getProperties",
+ "description": "Returns properties of a given object. Object group of the result is inherited from the target\nobject.",
+ "parameters": [
+ {
+ "name": "objectId",
+ "description": "Identifier of the object to return properties for.",
+ "$ref": "RemoteObjectId"
+ },
+ {
+ "name": "ownProperties",
+ "description": "If true, returns properties belonging only to the element itself, not to its prototype\nchain.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "accessorPropertiesOnly",
+ "description": "If true, returns accessor properties (with getter/setter) only; internal properties are not\nreturned either.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "generatePreview",
+ "description": "Whether preview should be generated for the results.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "description": "Object properties.",
+ "type": "array",
+ "items": {
+ "$ref": "PropertyDescriptor"
+ }
+ },
+ {
+ "name": "internalProperties",
+ "description": "Internal object properties (only of the element itself).",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "InternalPropertyDescriptor"
+ }
+ },
+ {
+ "name": "exceptionDetails",
+ "description": "Exception details.",
+ "optional": true,
+ "$ref": "ExceptionDetails"
+ }
+ ]
+ },
+ {
+ "name": "globalLexicalScopeNames",
+ "description": "Returns all let, const and class variables from global scope.",
+ "parameters": [
+ {
+ "name": "executionContextId",
+ "description": "Specifies in which execution context to lookup global scope variables.",
+ "optional": true,
+ "$ref": "ExecutionContextId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "names",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ {
+ "name": "queryObjects",
+ "parameters": [
+ {
+ "name": "prototypeObjectId",
+ "description": "Identifier of the prototype to return objects for.",
+ "$ref": "RemoteObjectId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "objects",
+ "description": "Array with objects.",
+ "$ref": "RemoteObject"
+ }
+ ]
+ },
+ {
+ "name": "releaseObject",
+ "description": "Releases remote object with given id.",
+ "parameters": [
+ {
+ "name": "objectId",
+ "description": "Identifier of the object to release.",
+ "$ref": "RemoteObjectId"
+ }
+ ]
+ },
+ {
+ "name": "releaseObjectGroup",
+ "description": "Releases all remote objects that belong to a given group.",
+ "parameters": [
+ {
+ "name": "objectGroup",
+ "description": "Symbolic object group name.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "runIfWaitingForDebugger",
+ "description": "Tells inspected instance to run if it was waiting for debugger to attach."
+ },
+ {
+ "name": "runScript",
+ "description": "Runs script with given id in a given context.",
+ "parameters": [
+ {
+ "name": "scriptId",
+ "description": "Id of the script to run.",
+ "$ref": "ScriptId"
+ },
+ {
+ "name": "executionContextId",
+ "description": "Specifies in which execution context to perform script run. If the parameter is omitted the\nevaluation will be performed in the context of the inspected page.",
+ "optional": true,
+ "$ref": "ExecutionContextId"
+ },
+ {
+ "name": "objectGroup",
+ "description": "Symbolic group name that can be used to release multiple objects.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "silent",
+ "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause\nexecution. Overrides `setPauseOnException` state.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "includeCommandLineAPI",
+ "description": "Determines whether Command Line API should be available during the evaluation.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "returnByValue",
+ "description": "Whether the result is expected to be a JSON object which should be sent by value.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "generatePreview",
+ "description": "Whether preview should be generated for the result.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "awaitPromise",
+ "description": "Whether execution should `await` for resulting value and return once awaited promise is\nresolved.",
+ "optional": true,
+ "type": "boolean"
+ }
+ ],
+ "returns": [
+ {
+ "name": "result",
+ "description": "Run result.",
+ "$ref": "RemoteObject"
+ },
+ {
+ "name": "exceptionDetails",
+ "description": "Exception details.",
+ "optional": true,
+ "$ref": "ExceptionDetails"
+ }
+ ]
+ },
+ {
+ "name": "setCustomObjectFormatterEnabled",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "enabled",
+ "type": "boolean"
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "consoleAPICalled",
+ "description": "Issued when console API was called.",
+ "parameters": [
+ {
+ "name": "type",
+ "description": "Type of the call.",
+ "type": "string",
+ "enum": [
+ "log",
+ "debug",
+ "info",
+ "error",
+ "warning",
+ "dir",
+ "dirxml",
+ "table",
+ "trace",
+ "clear",
+ "startGroup",
+ "startGroupCollapsed",
+ "endGroup",
+ "assert",
+ "profile",
+ "profileEnd",
+ "count",
+ "timeEnd"
+ ]
+ },
+ {
+ "name": "args",
+ "description": "Call arguments.",
+ "type": "array",
+ "items": {
+ "$ref": "RemoteObject"
+ }
+ },
+ {
+ "name": "executionContextId",
+ "description": "Identifier of the context where the call was made.",
+ "$ref": "ExecutionContextId"
+ },
+ {
+ "name": "timestamp",
+ "description": "Call timestamp.",
+ "$ref": "Timestamp"
+ },
+ {
+ "name": "stackTrace",
+ "description": "Stack trace captured when the call was made.",
+ "optional": true,
+ "$ref": "StackTrace"
+ },
+ {
+ "name": "context",
+ "description": "Console context descriptor for calls on non-default console context (not console.*):\n'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call\non named context.",
+ "experimental": true,
+ "optional": true,
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "exceptionRevoked",
+ "description": "Issued when unhandled exception was revoked.",
+ "parameters": [
+ {
+ "name": "reason",
+ "description": "Reason describing why exception was revoked.",
+ "type": "string"
+ },
+ {
+ "name": "exceptionId",
+ "description": "The id of revoked exception, as reported in `exceptionThrown`.",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "exceptionThrown",
+ "description": "Issued when exception was thrown and unhandled.",
+ "parameters": [
+ {
+ "name": "timestamp",
+ "description": "Timestamp of the exception.",
+ "$ref": "Timestamp"
+ },
+ {
+ "name": "exceptionDetails",
+ "$ref": "ExceptionDetails"
+ }
+ ]
+ },
+ {
+ "name": "executionContextCreated",
+ "description": "Issued when new execution context is created.",
+ "parameters": [
+ {
+ "name": "context",
+ "description": "A newly created execution context.",
+ "$ref": "ExecutionContextDescription"
+ }
+ ]
+ },
+ {
+ "name": "executionContextDestroyed",
+ "description": "Issued when execution context is destroyed.",
+ "parameters": [
+ {
+ "name": "executionContextId",
+ "description": "Id of the destroyed context",
+ "$ref": "ExecutionContextId"
+ }
+ ]
+ },
+ {
+ "name": "executionContextsCleared",
+ "description": "Issued when all executionContexts were cleared in browser"
+ },
+ {
+ "name": "inspectRequested",
+ "description": "Issued when object should be inspected (for example, as a result of inspect() command line API\ncall).",
+ "parameters": [
+ {
+ "name": "object",
+ "$ref": "RemoteObject"
+ },
+ {
+ "name": "hints",
+ "type": "object"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "Schema",
+ "description": "This domain is deprecated.",
+ "deprecated": true,
+ "types": [
+ {
+ "id": "Domain",
+ "description": "Description of the protocol domain.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "name",
+ "description": "Domain name.",
+ "type": "string"
+ },
+ {
+ "name": "version",
+ "description": "Domain version.",
+ "type": "string"
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "getDomains",
+ "description": "Returns supported domains.",
+ "returns": [
+ {
+ "name": "domains",
+ "description": "List of supported domains.",
+ "type": "array",
+ "items": {
+ "$ref": "Domain"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/deps/v8/src/inspector/js_protocol.pdl b/deps/v8/src/inspector/js_protocol.pdl
new file mode 100644
index 0000000000..5a23199e4a
--- /dev/null
+++ b/deps/v8/src/inspector/js_protocol.pdl
@@ -0,0 +1,1370 @@
+# Copyright 2017 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+version
+ major 1
+ minor 3
+
+# This domain is deprecated - use Runtime or Log instead.
+deprecated domain Console
+ depends on Runtime
+
+ # Console message.
+ type ConsoleMessage extends object
+ properties
+ # Message source.
+ enum source
+ xml
+ javascript
+ network
+ console-api
+ storage
+ appcache
+ rendering
+ security
+ other
+ deprecation
+ worker
+ # Message severity.
+ enum level
+ log
+ warning
+ error
+ debug
+ info
+ # Message text.
+ string text
+ # URL of the message origin.
+ optional string url
+ # Line number in the resource that generated this message (1-based).
+ optional integer line
+ # Column number in the resource that generated this message (1-based).
+ optional integer column
+
+ # Does nothing.
+ command clearMessages
+
+ # Disables console domain, prevents further console messages from being reported to the client.
+ command disable
+
+ # Enables console domain, sends the messages collected so far to the client by means of the
+ # `messageAdded` notification.
+ command enable
+
+ # Issued when new console message is added.
+ event messageAdded
+ parameters
+ # Console message that has been added.
+ ConsoleMessage message
+
+# Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing
+# breakpoints, stepping through execution, exploring stack traces, etc.
+domain Debugger
+ depends on Runtime
+
+ # Breakpoint identifier.
+ type BreakpointId extends string
+
+ # Call frame identifier.
+ type CallFrameId extends string
+
+ # Location in the source code.
+ type Location extends object
+ properties
+ # Script identifier as reported in the `Debugger.scriptParsed`.
+ Runtime.ScriptId scriptId
+ # Line number in the script (0-based).
+ integer lineNumber
+ # Column number in the script (0-based).
+ optional integer columnNumber
+
+ # Location in the source code.
+ experimental type ScriptPosition extends object
+ properties
+ integer lineNumber
+ integer columnNumber
+
+ # JavaScript call frame. Array of call frames form the call stack.
+ type CallFrame extends object
+ properties
+ # Call frame identifier. This identifier is only valid while the virtual machine is paused.
+ CallFrameId callFrameId
+ # Name of the JavaScript function called on this call frame.
+ string functionName
+ # Location in the source code.
+ optional Location functionLocation
+ # Location in the source code.
+ Location location
+ # JavaScript script name or url.
+ string url
+ # Scope chain for this call frame.
+ array of Scope scopeChain
+ # `this` object for this call frame.
+ Runtime.RemoteObject this
+ # The value being returned, if the function is at return point.
+ optional Runtime.RemoteObject returnValue
+
+ # Scope description.
+ type Scope extends object
+ properties
+ # Scope type.
+ enum type
+ global
+ local
+ with
+ closure
+ catch
+ block
+ script
+ eval
+ module
+ # Object representing the scope. For `global` and `with` scopes it represents the actual
+ # object; for the rest of the scopes, it is artificial transient object enumerating scope
+ # variables as its properties.
+ Runtime.RemoteObject object
+ optional string name
+ # Location in the source code where scope starts
+ optional Location startLocation
+ # Location in the source code where scope ends
+ optional Location endLocation
+
+ # Search match for resource.
+ type SearchMatch extends object
+ properties
+ # Line number in resource content.
+ number lineNumber
+ # Line with match content.
+ string lineContent
+
+ type BreakLocation extends object
+ properties
+ # Script identifier as reported in the `Debugger.scriptParsed`.
+ Runtime.ScriptId scriptId
+ # Line number in the script (0-based).
+ integer lineNumber
+ # Column number in the script (0-based).
+ optional integer columnNumber
+ optional enum type
+ debuggerStatement
+ call
+ return
+
+ # Continues execution until specific location is reached.
+ command continueToLocation
+ parameters
+ # Location to continue to.
+ Location location
+ optional enum targetCallFrames
+ any
+ current
+
+ # Disables debugger for given page.
+ command disable
+
+ # Enables debugger for the given page. Clients should not assume that the debugging has been
+ # enabled until the result for this command is received.
+ command enable
+ returns
+ # Unique identifier of the debugger.
+ experimental Runtime.UniqueDebuggerId debuggerId
+
+ # Evaluates expression on a given call frame.
+ command evaluateOnCallFrame
+ parameters
+ # Call frame identifier to evaluate on.
+ CallFrameId callFrameId
+ # Expression to evaluate.
+ string expression
+ # String object group name to put result into (allows rapid releasing resulting object handles
+ # using `releaseObjectGroup`).
+ optional string objectGroup
+ # Specifies whether command line API should be available to the evaluated expression, defaults
+ # to false.
+ optional boolean includeCommandLineAPI
+ # In silent mode exceptions thrown during evaluation are not reported and do not pause
+ # execution. Overrides `setPauseOnException` state.
+ optional boolean silent
+ # Whether the result is expected to be a JSON object that should be sent by value.
+ optional boolean returnByValue
+ # Whether preview should be generated for the result.
+ experimental optional boolean generatePreview
+ # Whether to throw an exception if side effect cannot be ruled out during evaluation.
+ optional boolean throwOnSideEffect
+ returns
+ # Object wrapper for the evaluation result.
+ Runtime.RemoteObject result
+ # Exception details.
+ optional Runtime.ExceptionDetails exceptionDetails
+
+ # Returns possible locations for breakpoint. scriptId in start and end range locations should be
+ # the same.
+ command getPossibleBreakpoints
+ parameters
+ # Start of range to search possible breakpoint locations in.
+ Location start
+ # End of range to search possible breakpoint locations in (excluding). When not specified, end
+ # of scripts is used as end of range.
+ optional Location end
+ # Only consider locations which are in the same (non-nested) function as start.
+ optional boolean restrictToFunction
+ returns
+ # List of the possible breakpoint locations.
+ array of BreakLocation locations
+
+ # Returns source for the script with given id.
+ command getScriptSource
+ parameters
+ # Id of the script to get source for.
+ Runtime.ScriptId scriptId
+ returns
+ # Script source.
+ string scriptSource
+
+ # Returns stack trace with given `stackTraceId`.
+ experimental command getStackTrace
+ parameters
+ Runtime.StackTraceId stackTraceId
+ returns
+ Runtime.StackTrace stackTrace
+
+ # Stops on the next JavaScript statement.
+ command pause
+
+ experimental command pauseOnAsyncCall
+ parameters
+ # Debugger will pause when async call with given stack trace is started.
+ Runtime.StackTraceId parentStackTraceId
+
+ # Removes JavaScript breakpoint.
+ command removeBreakpoint
+ parameters
+ BreakpointId breakpointId
+
+ # Restarts particular call frame from the beginning.
+ command restartFrame
+ parameters
+ # Call frame identifier to evaluate on.
+ CallFrameId callFrameId
+ returns
+ # New stack trace.
+ array of CallFrame callFrames
+ # Async stack trace, if any.
+ optional Runtime.StackTrace asyncStackTrace
+ # Async stack trace, if any.
+ experimental optional Runtime.StackTraceId asyncStackTraceId
+
+ # Resumes JavaScript execution.
+ command resume
+
+ # 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.
+ experimental command scheduleStepIntoAsync
+
+ # Searches for given string in script content.
+ command searchInContent
+ parameters
+ # Id of the script to search in.
+ Runtime.ScriptId scriptId
+ # String to search for.
+ string query
+ # If true, search is case sensitive.
+ optional boolean caseSensitive
+ # If true, treats string parameter as regex.
+ optional boolean isRegex
+ returns
+ # List of search matches.
+ array of SearchMatch result
+
+ # Enables or disables async call stacks tracking.
+ command setAsyncCallStackDepth
+ parameters
+ # Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
+ # call stacks (default).
+ integer maxDepth
+
+ # 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.
+ experimental command setBlackboxPatterns
+ parameters
+ # Array of regexps that will be used to check script url for blackbox state.
+ array of string patterns
+
+ # 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.
+ experimental command setBlackboxedRanges
+ parameters
+ # Id of the script.
+ Runtime.ScriptId scriptId
+ array of ScriptPosition positions
+
+ # Sets JavaScript breakpoint at a given location.
+ command setBreakpoint
+ parameters
+ # Location to set breakpoint in.
+ Location location
+ # Expression to use as a breakpoint condition. When specified, debugger will only stop on the
+ # breakpoint if this expression evaluates to true.
+ optional string condition
+ returns
+ # Id of the created breakpoint for further reference.
+ BreakpointId breakpointId
+ # Location this breakpoint resolved into.
+ Location actualLocation
+
+ # 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
+ # `locations` property. Further matching script parsing will result in subsequent
+ # `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
+ command setBreakpointByUrl
+ parameters
+ # Line number to set breakpoint at.
+ integer lineNumber
+ # URL of the resources to set breakpoint on.
+ optional string url
+ # Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
+ # `urlRegex` must be specified.
+ optional string urlRegex
+ # Script hash of the resources to set breakpoint on.
+ optional string scriptHash
+ # Offset in the line to set breakpoint at.
+ optional integer columnNumber
+ # Expression to use as a breakpoint condition. When specified, debugger will only stop on the
+ # breakpoint if this expression evaluates to true.
+ optional string condition
+ returns
+ # Id of the created breakpoint for further reference.
+ BreakpointId breakpointId
+ # List of the locations this breakpoint resolved into upon addition.
+ array of Location locations
+
+ # Activates / deactivates all breakpoints on the page.
+ command setBreakpointsActive
+ parameters
+ # New value for breakpoints active state.
+ boolean active
+
+ # Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or
+ # no exceptions. Initial pause on exceptions state is `none`.
+ command setPauseOnExceptions
+ parameters
+ # Pause on exceptions mode.
+ enum state
+ none
+ uncaught
+ all
+
+ # Changes return value in top frame. Available only at return break position.
+ experimental command setReturnValue
+ parameters
+ # New return value.
+ Runtime.CallArgument newValue
+
+ # Edits JavaScript source live.
+ command setScriptSource
+ parameters
+ # Id of the script to edit.
+ Runtime.ScriptId scriptId
+ # New content of the script.
+ string scriptSource
+ # If true the change will not actually be applied. Dry run may be used to get result
+ # description without actually modifying the code.
+ optional boolean dryRun
+ returns
+ # New stack trace in case editing has happened while VM was stopped.
+ optional array of CallFrame callFrames
+ # Whether current call stack was modified after applying the changes.
+ optional boolean stackChanged
+ # Async stack trace, if any.
+ optional Runtime.StackTrace asyncStackTrace
+ # Async stack trace, if any.
+ experimental optional Runtime.StackTraceId asyncStackTraceId
+ # Exception details if any.
+ optional Runtime.ExceptionDetails exceptionDetails
+
+ # Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
+ command setSkipAllPauses
+ parameters
+ # New value for skip pauses state.
+ boolean skip
+
+ # Changes value of variable in a callframe. Object-based scopes are not supported and must be
+ # mutated manually.
+ command setVariableValue
+ parameters
+ # 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.
+ integer scopeNumber
+ # Variable name.
+ string variableName
+ # New variable value.
+ Runtime.CallArgument newValue
+ # Id of callframe that holds variable.
+ CallFrameId callFrameId
+
+ # Steps into the function call.
+ command stepInto
+ parameters
+ # Debugger will issue additional Debugger.paused notification if any async task is scheduled
+ # before next pause.
+ experimental optional boolean breakOnAsyncCall
+
+ # Steps out of the function call.
+ command stepOut
+
+ # Steps over the statement.
+ command stepOver
+
+ # Fired when breakpoint is resolved to an actual script and location.
+ event breakpointResolved
+ parameters
+ # Breakpoint unique identifier.
+ BreakpointId breakpointId
+ # Actual breakpoint location.
+ Location location
+
+ # Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ event paused
+ parameters
+ # Call stack the virtual machine stopped on.
+ array of CallFrame callFrames
+ # Pause reason.
+ enum reason
+ XHR
+ DOM
+ EventListener
+ exception
+ assert
+ debugCommand
+ promiseRejection
+ OOM
+ other
+ ambiguous
+ # Object containing break-specific auxiliary properties.
+ optional object data
+ # Hit breakpoints IDs
+ optional array of string hitBreakpoints
+ # Async stack trace, if any.
+ optional Runtime.StackTrace asyncStackTrace
+ # Async stack trace, if any.
+ experimental optional Runtime.StackTraceId asyncStackTraceId
+ # Just scheduled async call will have this stack trace as parent stack during async execution.
+ # This field is available only after `Debugger.stepInto` call with `breakOnAsynCall` flag.
+ experimental optional Runtime.StackTraceId asyncCallStackTraceId
+
+ # Fired when the virtual machine resumed execution.
+ event resumed
+
+ # Fired when virtual machine fails to parse the script.
+ event scriptFailedToParse
+ parameters
+ # Identifier of the script parsed.
+ Runtime.ScriptId scriptId
+ # URL or name of the script parsed (if any).
+ string url
+ # Line offset of the script within the resource with given URL (for script tags).
+ integer startLine
+ # Column offset of the script within the resource with given URL.
+ integer startColumn
+ # Last line of the script.
+ integer endLine
+ # Length of the last line of the script.
+ integer endColumn
+ # Specifies script creation context.
+ Runtime.ExecutionContextId executionContextId
+ # Content hash of the script.
+ string hash
+ # Embedder-specific auxiliary data.
+ optional object executionContextAuxData
+ # URL of source map associated with script (if any).
+ optional string sourceMapURL
+ # True, if this script has sourceURL.
+ optional boolean hasSourceURL
+ # True, if this script is ES6 module.
+ optional boolean isModule
+ # This script length.
+ optional integer length
+ # JavaScript top stack frame of where the script parsed event was triggered if available.
+ experimental optional Runtime.StackTrace stackTrace
+
+ # Fired when virtual machine parses script. This event is also fired for all known and uncollected
+ # scripts upon enabling debugger.
+ event scriptParsed
+ parameters
+ # Identifier of the script parsed.
+ Runtime.ScriptId scriptId
+ # URL or name of the script parsed (if any).
+ string url
+ # Line offset of the script within the resource with given URL (for script tags).
+ integer startLine
+ # Column offset of the script within the resource with given URL.
+ integer startColumn
+ # Last line of the script.
+ integer endLine
+ # Length of the last line of the script.
+ integer endColumn
+ # Specifies script creation context.
+ Runtime.ExecutionContextId executionContextId
+ # Content hash of the script.
+ string hash
+ # Embedder-specific auxiliary data.
+ optional object executionContextAuxData
+ # True, if this script is generated as a result of the live edit operation.
+ experimental optional boolean isLiveEdit
+ # URL of source map associated with script (if any).
+ optional string sourceMapURL
+ # True, if this script has sourceURL.
+ optional boolean hasSourceURL
+ # True, if this script is ES6 module.
+ optional boolean isModule
+ # This script length.
+ optional integer length
+ # JavaScript top stack frame of where the script parsed event was triggered if available.
+ experimental optional Runtime.StackTrace stackTrace
+
+experimental domain HeapProfiler
+ depends on Runtime
+
+ # Heap snapshot object id.
+ type HeapSnapshotObjectId extends string
+
+ # Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
+ type SamplingHeapProfileNode extends object
+ properties
+ # Function location.
+ Runtime.CallFrame callFrame
+ # Allocations size in bytes for the node excluding children.
+ number selfSize
+ # Child nodes.
+ array of SamplingHeapProfileNode children
+
+ # Profile.
+ type SamplingHeapProfile extends object
+ properties
+ SamplingHeapProfileNode head
+
+ # Enables console to refer to the node with given id via $x (see Command Line API for more details
+ # $x functions).
+ command addInspectedHeapObject
+ parameters
+ # Heap snapshot object id to be accessible by means of $x command line API.
+ HeapSnapshotObjectId heapObjectId
+
+ command collectGarbage
+
+ command disable
+
+ command enable
+
+ command getHeapObjectId
+ parameters
+ # Identifier of the object to get heap object id for.
+ Runtime.RemoteObjectId objectId
+ returns
+ # Id of the heap snapshot object corresponding to the passed remote object id.
+ HeapSnapshotObjectId heapSnapshotObjectId
+
+ command getObjectByHeapObjectId
+ parameters
+ HeapSnapshotObjectId objectId
+ # Symbolic group name that can be used to release multiple objects.
+ optional string objectGroup
+ returns
+ # Evaluation result.
+ Runtime.RemoteObject result
+
+ command getSamplingProfile
+ returns
+ # Return the sampling profile being collected.
+ SamplingHeapProfile profile
+
+ command startSampling
+ parameters
+ # Average sample interval in bytes. Poisson distribution is used for the intervals. The
+ # default value is 32768 bytes.
+ optional number samplingInterval
+
+ command startTrackingHeapObjects
+ parameters
+ optional boolean trackAllocations
+
+ command stopSampling
+ returns
+ # Recorded sampling heap profile.
+ SamplingHeapProfile profile
+
+ command stopTrackingHeapObjects
+ parameters
+ # If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
+ # when the tracking is stopped.
+ optional boolean reportProgress
+
+ command takeHeapSnapshot
+ parameters
+ # If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
+ optional boolean reportProgress
+
+ event addHeapSnapshotChunk
+ parameters
+ string chunk
+
+ # If heap objects tracking has been started then backend may send update for one or more fragments
+ event heapStatsUpdate
+ parameters
+ # 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.
+ array of integer statsUpdate
+
+ # 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.
+ event lastSeenObjectId
+ parameters
+ integer lastSeenObjectId
+ number timestamp
+
+ event reportHeapSnapshotProgress
+ parameters
+ integer done
+ integer total
+ optional boolean finished
+
+ event resetProfiles
+
+domain Profiler
+ depends on Runtime
+ depends on Debugger
+
+ # Profile node. Holds callsite information, execution statistics and child nodes.
+ type ProfileNode extends object
+ properties
+ # Unique id of the node.
+ integer id
+ # Function location.
+ Runtime.CallFrame callFrame
+ # Number of samples where this node was on top of the call stack.
+ optional integer hitCount
+ # Child node ids.
+ optional array of integer children
+ # The reason of being not optimized. The function may be deoptimized or marked as don't
+ # optimize.
+ optional string deoptReason
+ # An array of source position ticks.
+ optional array of PositionTickInfo positionTicks
+
+ # Profile.
+ type Profile extends object
+ properties
+ # The list of profile nodes. First item is the root node.
+ array of ProfileNode nodes
+ # Profiling start timestamp in microseconds.
+ number startTime
+ # Profiling end timestamp in microseconds.
+ number endTime
+ # Ids of samples top nodes.
+ optional array of integer samples
+ # Time intervals between adjacent samples in microseconds. The first delta is relative to the
+ # profile startTime.
+ optional array of integer timeDeltas
+
+ # Specifies a number of samples attributed to a certain source position.
+ type PositionTickInfo extends object
+ properties
+ # Source line number (1-based).
+ integer line
+ # Number of samples attributed to the source line.
+ integer ticks
+
+ # Coverage data for a source range.
+ type CoverageRange extends object
+ properties
+ # JavaScript script source offset for the range start.
+ integer startOffset
+ # JavaScript script source offset for the range end.
+ integer endOffset
+ # Collected execution count of the source range.
+ integer count
+
+ # Coverage data for a JavaScript function.
+ type FunctionCoverage extends object
+ properties
+ # JavaScript function name.
+ string functionName
+ # Source ranges inside the function with coverage data.
+ array of CoverageRange ranges
+ # Whether coverage data for this function has block granularity.
+ boolean isBlockCoverage
+
+ # Coverage data for a JavaScript script.
+ type ScriptCoverage extends object
+ properties
+ # JavaScript script id.
+ Runtime.ScriptId scriptId
+ # JavaScript script name or url.
+ string url
+ # Functions contained in the script that has coverage data.
+ array of FunctionCoverage functions
+
+ # Describes a type collected during runtime.
+ experimental type TypeObject extends object
+ properties
+ # Name of a type collected with type profiling.
+ string name
+
+ # Source offset and types for a parameter or return value.
+ experimental type TypeProfileEntry extends object
+ properties
+ # Source offset of the parameter or end of function for return values.
+ integer offset
+ # The types for this parameter or return value.
+ array of TypeObject types
+
+ # Type profile data collected during runtime for a JavaScript script.
+ experimental type ScriptTypeProfile extends object
+ properties
+ # JavaScript script id.
+ Runtime.ScriptId scriptId
+ # JavaScript script name or url.
+ string url
+ # Type profile entries for parameters and return values of the functions in the script.
+ array of TypeProfileEntry entries
+
+ command disable
+
+ command enable
+
+ # Collect coverage data for the current isolate. The coverage data may be incomplete due to
+ # garbage collection.
+ command getBestEffortCoverage
+ returns
+ # Coverage data for the current isolate.
+ array of ScriptCoverage result
+
+ # Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
+ command setSamplingInterval
+ parameters
+ # New sampling interval in microseconds.
+ integer interval
+
+ command start
+
+ # 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.
+ command startPreciseCoverage
+ parameters
+ # Collect accurate call counts beyond simple 'covered' or 'not covered'.
+ optional boolean callCount
+ # Collect block-based coverage.
+ optional boolean detailed
+
+ # Enable type profile.
+ experimental command startTypeProfile
+
+ command stop
+ returns
+ # Recorded profile.
+ Profile profile
+
+ # Disable precise code coverage. Disabling releases unnecessary execution count records and allows
+ # executing optimized code.
+ command stopPreciseCoverage
+
+ # Disable type profile. Disabling releases type profile data collected so far.
+ experimental command stopTypeProfile
+
+ # Collect coverage data for the current isolate, and resets execution counters. Precise code
+ # coverage needs to have started.
+ command takePreciseCoverage
+ returns
+ # Coverage data for the current isolate.
+ array of ScriptCoverage result
+
+ # Collect type profile.
+ experimental command takeTypeProfile
+ returns
+ # Type profile for all scripts since startTypeProfile() was turned on.
+ array of ScriptTypeProfile result
+
+ event consoleProfileFinished
+ parameters
+ string id
+ # Location of console.profileEnd().
+ Debugger.Location location
+ Profile profile
+ # Profile title passed as an argument to console.profile().
+ optional string title
+
+ # Sent when new profile recording is started using console.profile() call.
+ event consoleProfileStarted
+ parameters
+ string id
+ # Location of console.profile().
+ Debugger.Location location
+ # Profile title passed as an argument to console.profile().
+ optional string title
+
+# Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects.
+# Evaluation results are returned as mirror object that expose object type, string representation
+# and unique identifier that can be used for further object reference. Original objects are
+# maintained in memory unless they are either explicitly released or are released along with the
+# other objects in their object group.
+domain Runtime
+
+ # Unique script identifier.
+ type ScriptId extends string
+
+ # Unique object identifier.
+ type RemoteObjectId extends string
+
+ # Primitive value which cannot be JSON-stringified.
+ type UnserializableValue extends string
+ enum
+ Infinity
+ NaN
+ -Infinity
+ -0
+
+ # Mirror object referencing original JavaScript object.
+ type RemoteObject extends object
+ properties
+ # Object type.
+ enum type
+ object
+ function
+ undefined
+ string
+ number
+ boolean
+ symbol
+ # Object subtype hint. Specified for `object` type values only.
+ optional enum subtype
+ array
+ null
+ node
+ regexp
+ date
+ map
+ set
+ weakmap
+ weakset
+ iterator
+ generator
+ error
+ proxy
+ promise
+ typedarray
+ # Object class (constructor) name. Specified for `object` type values only.
+ optional string className
+ # Remote object value in case of primitive values or JSON values (if it was requested).
+ optional any value
+ # Primitive value which can not be JSON-stringified does not have `value`, but gets this
+ # property.
+ optional UnserializableValue unserializableValue
+ # String representation of the object.
+ optional string description
+ # Unique object identifier (for non-primitive values).
+ optional RemoteObjectId objectId
+ # Preview containing abbreviated property values. Specified for `object` type values only.
+ experimental optional ObjectPreview preview
+ experimental optional CustomPreview customPreview
+
+ experimental type CustomPreview extends object
+ properties
+ string header
+ boolean hasBody
+ RemoteObjectId formatterObjectId
+ RemoteObjectId bindRemoteObjectFunctionId
+ optional RemoteObjectId configObjectId
+
+ # Object containing abbreviated remote object value.
+ experimental type ObjectPreview extends object
+ properties
+ # Object type.
+ enum type
+ object
+ function
+ undefined
+ string
+ number
+ boolean
+ symbol
+ # Object subtype hint. Specified for `object` type values only.
+ optional enum subtype
+ array
+ null
+ node
+ regexp
+ date
+ map
+ set
+ weakmap
+ weakset
+ iterator
+ generator
+ error
+ # String representation of the object.
+ optional string description
+ # True iff some of the properties or entries of the original object did not fit.
+ boolean overflow
+ # List of the properties.
+ array of PropertyPreview properties
+ # List of the entries. Specified for `map` and `set` subtype values only.
+ optional array of EntryPreview entries
+
+ experimental type PropertyPreview extends object
+ properties
+ # Property name.
+ string name
+ # Object type. Accessor means that the property itself is an accessor property.
+ enum type
+ object
+ function
+ undefined
+ string
+ number
+ boolean
+ symbol
+ accessor
+ # User-friendly property value string.
+ optional string value
+ # Nested value preview.
+ optional ObjectPreview valuePreview
+ # Object subtype hint. Specified for `object` type values only.
+ optional enum subtype
+ array
+ null
+ node
+ regexp
+ date
+ map
+ set
+ weakmap
+ weakset
+ iterator
+ generator
+ error
+
+ experimental type EntryPreview extends object
+ properties
+ # Preview of the key. Specified for map-like collection entries.
+ optional ObjectPreview key
+ # Preview of the value.
+ ObjectPreview value
+
+ # Object property descriptor.
+ type PropertyDescriptor extends object
+ properties
+ # Property name or symbol description.
+ string name
+ # The value associated with the property.
+ optional RemoteObject value
+ # True if the value associated with the property may be changed (data descriptors only).
+ optional boolean writable
+ # A function which serves as a getter for the property, or `undefined` if there is no getter
+ # (accessor descriptors only).
+ optional RemoteObject get
+ # A function which serves as a setter for the property, or `undefined` if there is no setter
+ # (accessor descriptors only).
+ optional RemoteObject set
+ # True if the type of this property descriptor may be changed and if the property may be
+ # deleted from the corresponding object.
+ boolean configurable
+ # True if this property shows up during enumeration of the properties on the corresponding
+ # object.
+ boolean enumerable
+ # True if the result was thrown during the evaluation.
+ optional boolean wasThrown
+ # True if the property is owned for the object.
+ optional boolean isOwn
+ # Property symbol object, if the property is of the `symbol` type.
+ optional RemoteObject symbol
+
+ # Object internal property descriptor. This property isn't normally visible in JavaScript code.
+ type InternalPropertyDescriptor extends object
+ properties
+ # Conventional property name.
+ string name
+ # The value associated with the property.
+ optional RemoteObject value
+
+ # Represents function call argument. Either remote object id `objectId`, primitive `value`,
+ # unserializable primitive value or neither of (for undefined) them should be specified.
+ type CallArgument extends object
+ properties
+ # Primitive value or serializable javascript object.
+ optional any value
+ # Primitive value which can not be JSON-stringified.
+ optional UnserializableValue unserializableValue
+ # Remote object handle.
+ optional RemoteObjectId objectId
+
+ # Id of an execution context.
+ type ExecutionContextId extends integer
+
+ # Description of an isolated world.
+ type ExecutionContextDescription extends object
+ properties
+ # Unique id of the execution context. It can be used to specify in which execution context
+ # script evaluation should be performed.
+ ExecutionContextId id
+ # Execution context origin.
+ string origin
+ # Human readable name describing given context.
+ string name
+ # Embedder-specific auxiliary data.
+ optional object auxData
+
+ # Detailed information about exception (or error) that was thrown during script compilation or
+ # execution.
+ type ExceptionDetails extends object
+ properties
+ # Exception id.
+ integer exceptionId
+ # Exception text, which should be used together with exception object when available.
+ string text
+ # Line number of the exception location (0-based).
+ integer lineNumber
+ # Column number of the exception location (0-based).
+ integer columnNumber
+ # Script ID of the exception location.
+ optional ScriptId scriptId
+ # URL of the exception location, to be used when the script was not reported.
+ optional string url
+ # JavaScript stack trace if available.
+ optional StackTrace stackTrace
+ # Exception object if available.
+ optional RemoteObject exception
+ # Identifier of the context where exception happened.
+ optional ExecutionContextId executionContextId
+
+ # Number of milliseconds since epoch.
+ type Timestamp extends number
+
+ # Stack entry for runtime errors and assertions.
+ type CallFrame extends object
+ properties
+ # JavaScript function name.
+ string functionName
+ # JavaScript script id.
+ ScriptId scriptId
+ # JavaScript script name or url.
+ string url
+ # JavaScript script line number (0-based).
+ integer lineNumber
+ # JavaScript script column number (0-based).
+ integer columnNumber
+
+ # Call frames for assertions or error messages.
+ type StackTrace extends object
+ properties
+ # String label of this stack trace. For async traces this may be a name of the function that
+ # initiated the async call.
+ optional string description
+ # JavaScript function name.
+ array of CallFrame callFrames
+ # Asynchronous JavaScript stack trace that preceded this stack, if available.
+ optional StackTrace parent
+ # Asynchronous JavaScript stack trace that preceded this stack, if available.
+ experimental optional StackTraceId parentId
+
+ # Unique identifier of current debugger.
+ experimental type UniqueDebuggerId extends string
+
+ # If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This
+ # allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.
+ experimental type StackTraceId extends object
+ properties
+ string id
+ optional UniqueDebuggerId debuggerId
+
+ # Add handler to promise with given promise object id.
+ command awaitPromise
+ parameters
+ # Identifier of the promise.
+ RemoteObjectId promiseObjectId
+ # Whether the result is expected to be a JSON object that should be sent by value.
+ optional boolean returnByValue
+ # Whether preview should be generated for the result.
+ optional boolean generatePreview
+ returns
+ # Promise result. Will contain rejected value if promise was rejected.
+ RemoteObject result
+ # Exception details if stack strace is available.
+ optional ExceptionDetails exceptionDetails
+
+ # Calls function with given declaration on the given object. Object group of the result is
+ # inherited from the target object.
+ command callFunctionOn
+ parameters
+ # Declaration of the function to call.
+ string functionDeclaration
+ # Identifier of the object to call function on. Either objectId or executionContextId should
+ # be specified.
+ optional RemoteObjectId objectId
+ # Call arguments. All call arguments must belong to the same JavaScript world as the target
+ # object.
+ optional array of CallArgument arguments
+ # In silent mode exceptions thrown during evaluation are not reported and do not pause
+ # execution. Overrides `setPauseOnException` state.
+ optional boolean silent
+ # Whether the result is expected to be a JSON object which should be sent by value.
+ optional boolean returnByValue
+ # Whether preview should be generated for the result.
+ experimental optional boolean generatePreview
+ # Whether execution should be treated as initiated by user in the UI.
+ optional boolean userGesture
+ # Whether execution should `await` for resulting value and return once awaited promise is
+ # resolved.
+ optional boolean awaitPromise
+ # Specifies execution context which global object will be used to call function on. Either
+ # executionContextId or objectId should be specified.
+ optional ExecutionContextId executionContextId
+ # 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.
+ optional string objectGroup
+ returns
+ # Call result.
+ RemoteObject result
+ # Exception details.
+ optional ExceptionDetails exceptionDetails
+
+ # Compiles expression.
+ command compileScript
+ parameters
+ # Expression to compile.
+ string expression
+ # Source url to be set for the script.
+ string sourceURL
+ # Specifies whether the compiled script should be persisted.
+ boolean persistScript
+ # 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.
+ optional ExecutionContextId executionContextId
+ returns
+ # Id of the script.
+ optional ScriptId scriptId
+ # Exception details.
+ optional ExceptionDetails exceptionDetails
+
+ # Disables reporting of execution contexts creation.
+ command disable
+
+ # Discards collected exceptions and console API calls.
+ command discardConsoleEntries
+
+ # Enables reporting of execution contexts creation by means of `executionContextCreated` event.
+ # When the reporting gets enabled the event will be sent immediately for each existing execution
+ # context.
+ command enable
+
+ # Evaluates expression on global object.
+ command evaluate
+ parameters
+ # Expression to evaluate.
+ string expression
+ # Symbolic group name that can be used to release multiple objects.
+ optional string objectGroup
+ # Determines whether Command Line API should be available during the evaluation.
+ optional boolean includeCommandLineAPI
+ # In silent mode exceptions thrown during evaluation are not reported and do not pause
+ # execution. Overrides `setPauseOnException` state.
+ optional boolean silent
+ # 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.
+ optional ExecutionContextId contextId
+ # Whether the result is expected to be a JSON object that should be sent by value.
+ optional boolean returnByValue
+ # Whether preview should be generated for the result.
+ experimental optional boolean generatePreview
+ # Whether execution should be treated as initiated by user in the UI.
+ optional boolean userGesture
+ # Whether execution should `await` for resulting value and return once awaited promise is
+ # resolved.
+ optional boolean awaitPromise
+ returns
+ # Evaluation result.
+ RemoteObject result
+ # Exception details.
+ optional ExceptionDetails exceptionDetails
+
+ # Returns properties of a given object. Object group of the result is inherited from the target
+ # object.
+ command getProperties
+ parameters
+ # Identifier of the object to return properties for.
+ RemoteObjectId objectId
+ # If true, returns properties belonging only to the element itself, not to its prototype
+ # chain.
+ optional boolean ownProperties
+ # If true, returns accessor properties (with getter/setter) only; internal properties are not
+ # returned either.
+ experimental optional boolean accessorPropertiesOnly
+ # Whether preview should be generated for the results.
+ experimental optional boolean generatePreview
+ returns
+ # Object properties.
+ array of PropertyDescriptor result
+ # Internal object properties (only of the element itself).
+ optional array of InternalPropertyDescriptor internalProperties
+ # Exception details.
+ optional ExceptionDetails exceptionDetails
+
+ # Returns all let, const and class variables from global scope.
+ command globalLexicalScopeNames
+ parameters
+ # Specifies in which execution context to lookup global scope variables.
+ optional ExecutionContextId executionContextId
+ returns
+ array of string names
+
+ command queryObjects
+ parameters
+ # Identifier of the prototype to return objects for.
+ RemoteObjectId prototypeObjectId
+ returns
+ # Array with objects.
+ RemoteObject objects
+
+ # Releases remote object with given id.
+ command releaseObject
+ parameters
+ # Identifier of the object to release.
+ RemoteObjectId objectId
+
+ # Releases all remote objects that belong to a given group.
+ command releaseObjectGroup
+ parameters
+ # Symbolic object group name.
+ string objectGroup
+
+ # Tells inspected instance to run if it was waiting for debugger to attach.
+ command runIfWaitingForDebugger
+
+ # Runs script with given id in a given context.
+ command runScript
+ parameters
+ # Id of the script to run.
+ ScriptId scriptId
+ # 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.
+ optional ExecutionContextId executionContextId
+ # Symbolic group name that can be used to release multiple objects.
+ optional string objectGroup
+ # In silent mode exceptions thrown during evaluation are not reported and do not pause
+ # execution. Overrides `setPauseOnException` state.
+ optional boolean silent
+ # Determines whether Command Line API should be available during the evaluation.
+ optional boolean includeCommandLineAPI
+ # Whether the result is expected to be a JSON object which should be sent by value.
+ optional boolean returnByValue
+ # Whether preview should be generated for the result.
+ optional boolean generatePreview
+ # Whether execution should `await` for resulting value and return once awaited promise is
+ # resolved.
+ optional boolean awaitPromise
+ returns
+ # Run result.
+ RemoteObject result
+ # Exception details.
+ optional ExceptionDetails exceptionDetails
+
+ experimental command setCustomObjectFormatterEnabled
+ parameters
+ boolean enabled
+
+ # Issued when console API was called.
+ event consoleAPICalled
+ parameters
+ # Type of the call.
+ enum type
+ log
+ debug
+ info
+ error
+ warning
+ dir
+ dirxml
+ table
+ trace
+ clear
+ startGroup
+ startGroupCollapsed
+ endGroup
+ assert
+ profile
+ profileEnd
+ count
+ timeEnd
+ # Call arguments.
+ array of RemoteObject args
+ # Identifier of the context where the call was made.
+ ExecutionContextId executionContextId
+ # Call timestamp.
+ Timestamp timestamp
+ # Stack trace captured when the call was made.
+ optional StackTrace stackTrace
+ # 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.
+ experimental optional string context
+
+ # Issued when unhandled exception was revoked.
+ event exceptionRevoked
+ parameters
+ # Reason describing why exception was revoked.
+ string reason
+ # The id of revoked exception, as reported in `exceptionThrown`.
+ integer exceptionId
+
+ # Issued when exception was thrown and unhandled.
+ event exceptionThrown
+ parameters
+ # Timestamp of the exception.
+ Timestamp timestamp
+ ExceptionDetails exceptionDetails
+
+ # Issued when new execution context is created.
+ event executionContextCreated
+ parameters
+ # A newly created execution context.
+ ExecutionContextDescription context
+
+ # Issued when execution context is destroyed.
+ event executionContextDestroyed
+ parameters
+ # Id of the destroyed context
+ ExecutionContextId executionContextId
+
+ # Issued when all executionContexts were cleared in browser
+ event executionContextsCleared
+
+ # Issued when object should be inspected (for example, as a result of inspect() command line API
+ # call).
+ event inspectRequested
+ parameters
+ RemoteObject object
+ object hints
+
+# This domain is deprecated.
+deprecated domain Schema
+
+ # Description of the protocol domain.
+ type Domain extends object
+ properties
+ # Domain name.
+ string name
+ # Domain version.
+ string version
+
+ # Returns supported domains.
+ command getDomains
+ returns
+ # List of supported domains.
+ array of Domain domains
diff --git a/deps/v8/src/inspector/string-16.cc b/deps/v8/src/inspector/string-16.cc
index 36a0cca26c..dc753fee40 100644
--- a/deps/v8/src/inspector/string-16.cc
+++ b/deps/v8/src/inspector/string-16.cc
@@ -162,15 +162,15 @@ ConversionResult convertUTF16ToUTF8(const UChar** sourceStart,
* @return TRUE or FALSE
* @stable ICU 2.8
*/
-#define U_IS_BMP(c) ((uint32_t)(c) <= 0xffff)
+#define U_IS_BMP(c) ((uint32_t)(c) <= 0xFFFF)
/**
- * Is this code point a supplementary code point (U+10000..U+10ffff)?
+ * Is this code point a supplementary code point (U+010000..U+10FFFF)?
* @param c 32-bit code point
* @return TRUE or FALSE
* @stable ICU 2.8
*/
-#define U_IS_SUPPLEMENTARY(c) ((uint32_t)((c)-0x10000) <= 0xfffff)
+#define U_IS_SUPPLEMENTARY(c) ((uint32_t)((c)-0x010000) <= 0xFFFFF)
/**
* Is this code point a surrogate (U+d800..U+dfff)?
@@ -178,25 +178,25 @@ ConversionResult convertUTF16ToUTF8(const UChar** sourceStart,
* @return TRUE or FALSE
* @stable ICU 2.4
*/
-#define U_IS_SURROGATE(c) (((c)&0xfffff800) == 0xd800)
+#define U_IS_SURROGATE(c) (((c)&0xFFFFF800) == 0xD800)
/**
- * Get the lead surrogate (0xd800..0xdbff) for a
- * supplementary code point (0x10000..0x10ffff).
- * @param supplementary 32-bit code point (U+10000..U+10ffff)
- * @return lead surrogate (U+d800..U+dbff) for supplementary
+ * Get the lead surrogate (0xD800..0xDBFF) for a
+ * supplementary code point (0x010000..0x10FFFF).
+ * @param supplementary 32-bit code point (U+010000..U+10FFFF)
+ * @return lead surrogate (U+D800..U+DBFF) for supplementary
* @stable ICU 2.4
*/
-#define U16_LEAD(supplementary) (UChar)(((supplementary) >> 10) + 0xd7c0)
+#define U16_LEAD(supplementary) (UChar)(((supplementary) >> 10) + 0xD7C0)
/**
- * Get the trail surrogate (0xdc00..0xdfff) for a
- * supplementary code point (0x10000..0x10ffff).
- * @param supplementary 32-bit code point (U+10000..U+10ffff)
- * @return trail surrogate (U+dc00..U+dfff) for supplementary
+ * Get the trail surrogate (0xDC00..0xDFFF) for a
+ * supplementary code point (0x010000..0x10FFFF).
+ * @param supplementary 32-bit code point (U+010000..U+10FFFF)
+ * @return trail surrogate (U+DC00..U+DFFF) for supplementary
* @stable ICU 2.4
*/
-#define U16_TRAIL(supplementary) (UChar)(((supplementary)&0x3ff) | 0xdc00)
+#define U16_TRAIL(supplementary) (UChar)(((supplementary)&0x3FF) | 0xDC00)
// This must be called with the length pre-determined by the first byte.
// If presented with a length > 4, this returns false. The Unicode
@@ -329,7 +329,7 @@ ConversionResult convertUTF8ToUTF16(const char** sourceStart,
}
*target++ = U16_LEAD(character);
*target++ = U16_TRAIL(character);
- orAllData = 0xffff;
+ orAllData = 0xFFFF;
} else {
if (strict) {
source -= utf8SequenceLength; // return to the start
@@ -344,7 +344,7 @@ ConversionResult convertUTF8ToUTF16(const char** sourceStart,
*sourceStart = source;
*targetStart = target;
- if (sourceAllASCII) *sourceAllASCII = !(orAllData & ~0x7f);
+ if (sourceAllASCII) *sourceAllASCII = !(orAllData & ~0x7F);
return result;
}
diff --git a/deps/v8/src/inspector/v8-console-message.cc b/deps/v8/src/inspector/v8-console-message.cc
index 1129eac676..e96e89c0eb 100644
--- a/deps/v8/src/inspector/v8-console-message.cc
+++ b/deps/v8/src/inspector/v8-console-message.cc
@@ -528,6 +528,11 @@ double V8ConsoleMessageStorage::timeEnd(int contextId, const String16& id) {
return elapsed;
}
+bool V8ConsoleMessageStorage::hasTimer(int contextId, const String16& id) {
+ const std::map<String16, double>& time = m_data[contextId].m_time;
+ return time.find(id) != time.end();
+}
+
void V8ConsoleMessageStorage::contextDestroyed(int contextId) {
m_estimatedSize = 0;
for (size_t i = 0; i < m_messages.size(); ++i) {
diff --git a/deps/v8/src/inspector/v8-console-message.h b/deps/v8/src/inspector/v8-console-message.h
index 57f692f6db..f82f8e5a13 100644
--- a/deps/v8/src/inspector/v8-console-message.h
+++ b/deps/v8/src/inspector/v8-console-message.h
@@ -120,6 +120,7 @@ class V8ConsoleMessageStorage {
int count(int contextId, const String16& id);
void time(int contextId, const String16& id);
double timeEnd(int contextId, const String16& id);
+ bool hasTimer(int contextId, const String16& id);
private:
V8InspectorImpl* m_inspector;
diff --git a/deps/v8/src/inspector/v8-console.cc b/deps/v8/src/inspector/v8-console.cc
index 7a0caf08a1..fa04209dec 100644
--- a/deps/v8/src/inspector/v8-console.cc
+++ b/deps/v8/src/inspector/v8-console.cc
@@ -284,7 +284,7 @@ void V8Console::Clear(const v8::debug::ConsoleCallArguments& info,
void V8Console::Count(const v8::debug::ConsoleCallArguments& info,
const v8::debug::ConsoleContext& consoleContext) {
ConsoleHelper helper(info, consoleContext, m_inspector);
- String16 title = helper.firstArgToString(String16());
+ String16 title = helper.firstArgToString(String16("default"), false);
String16 identifier;
if (title.isEmpty()) {
std::unique_ptr<V8StackTraceImpl> stackTrace =
@@ -354,10 +354,16 @@ static void timeFunction(const v8::debug::ConsoleCallArguments& info,
ConsoleHelper helper(info, consoleContext, inspector);
String16 protocolTitle = helper.firstArgToString("default", false);
if (timelinePrefix) protocolTitle = "Timeline '" + protocolTitle + "'";
+ const String16& timerId =
+ protocolTitle + "@" + consoleContextToString(consoleContext);
+ if (helper.consoleMessageStorage()->hasTimer(helper.contextId(), timerId)) {
+ helper.reportCallWithArgument(
+ ConsoleAPIType::kWarning,
+ "Timer '" + protocolTitle + "' already exists");
+ return;
+ }
inspector->client()->consoleTime(toStringView(protocolTitle));
- helper.consoleMessageStorage()->time(
- helper.contextId(),
- protocolTitle + "@" + consoleContextToString(consoleContext));
+ helper.consoleMessageStorage()->time(helper.contextId(), timerId);
}
static void timeEndFunction(const v8::debug::ConsoleCallArguments& info,
@@ -366,6 +372,14 @@ static void timeEndFunction(const v8::debug::ConsoleCallArguments& info,
ConsoleHelper helper(info, consoleContext, inspector);
String16 protocolTitle = helper.firstArgToString("default", false);
if (timelinePrefix) protocolTitle = "Timeline '" + protocolTitle + "'";
+ const String16& timerId =
+ protocolTitle + "@" + consoleContextToString(consoleContext);
+ if (!helper.consoleMessageStorage()->hasTimer(helper.contextId(), timerId)) {
+ helper.reportCallWithArgument(
+ ConsoleAPIType::kWarning,
+ "Timer '" + protocolTitle + "' does not exist");
+ return;
+ }
inspector->client()->consoleTimeEnd(toStringView(protocolTitle));
double elapsed = helper.consoleMessageStorage()->timeEnd(
helper.contextId(),
diff --git a/deps/v8/src/inspector/v8-debugger-agent-impl.cc b/deps/v8/src/inspector/v8-debugger-agent-impl.cc
index 8e5142d36e..7bfde09b71 100644
--- a/deps/v8/src/inspector/v8-debugger-agent-impl.cc
+++ b/deps/v8/src/inspector/v8-debugger-agent-impl.cc
@@ -553,7 +553,7 @@ Response V8DebuggerAgentImpl::setBreakpointByUrl(
}
std::unique_ptr<protocol::Debugger::Location> location = setBreakpointImpl(
breakpointId, script.first, condition, lineNumber, columnNumber);
- if (type != BreakpointType::kByUrlRegex) {
+ if (location && type != BreakpointType::kByUrlRegex) {
hint = breakpointHint(*script.second, lineNumber, columnNumber);
}
if (location) (*locations)->addItem(std::move(location));
@@ -1330,6 +1330,24 @@ V8DebuggerAgentImpl::currentExternalStackTrace() {
.build();
}
+std::unique_ptr<protocol::Runtime::StackTraceId>
+V8DebuggerAgentImpl::currentScheduledAsyncCall() {
+ v8_inspector::V8StackTraceId scheduledAsyncCall =
+ m_debugger->scheduledAsyncCall();
+ if (scheduledAsyncCall.IsInvalid()) return nullptr;
+ std::unique_ptr<protocol::Runtime::StackTraceId> asyncCallStackTrace =
+ protocol::Runtime::StackTraceId::create()
+ .setId(stackTraceIdToString(scheduledAsyncCall.id))
+ .build();
+ // TODO(kozyatinskiy): extract this check to IsLocal function.
+ if (scheduledAsyncCall.debugger_id.first ||
+ scheduledAsyncCall.debugger_id.second) {
+ asyncCallStackTrace->setDebuggerId(
+ debuggerIdToString(scheduledAsyncCall.debugger_id));
+ }
+ return asyncCallStackTrace;
+}
+
bool V8DebuggerAgentImpl::isPaused() const {
return m_debugger->isPausedInContextGroup(m_session->contextGroupId());
}
@@ -1532,22 +1550,10 @@ void V8DebuggerAgentImpl::didPause(
Response response = currentCallFrames(&protocolCallFrames);
if (!response.isSuccess()) protocolCallFrames = Array<CallFrame>::create();
- Maybe<protocol::Runtime::StackTraceId> asyncCallStackTrace;
- void* rawScheduledAsyncTask = m_debugger->scheduledAsyncTask();
- if (rawScheduledAsyncTask) {
- asyncCallStackTrace =
- protocol::Runtime::StackTraceId::create()
- .setId(stackTraceIdToString(
- reinterpret_cast<uintptr_t>(rawScheduledAsyncTask)))
- .setDebuggerId(debuggerIdToString(
- m_debugger->debuggerIdFor(m_session->contextGroupId())))
- .build();
- }
-
m_frontend.paused(std::move(protocolCallFrames), breakReason,
std::move(breakAuxData), std::move(hitBreakpointIds),
currentAsyncStackTrace(), currentExternalStackTrace(),
- std::move(asyncCallStackTrace));
+ currentScheduledAsyncCall());
}
void V8DebuggerAgentImpl::didContinue() {
diff --git a/deps/v8/src/inspector/v8-debugger-agent-impl.h b/deps/v8/src/inspector/v8-debugger-agent-impl.h
index e697b700e9..168c5a7724 100644
--- a/deps/v8/src/inspector/v8-debugger-agent-impl.h
+++ b/deps/v8/src/inspector/v8-debugger-agent-impl.h
@@ -156,6 +156,7 @@ class V8DebuggerAgentImpl : public protocol::Debugger::Backend {
std::unique_ptr<protocol::Array<protocol::Debugger::CallFrame>>*);
std::unique_ptr<protocol::Runtime::StackTrace> currentAsyncStackTrace();
std::unique_ptr<protocol::Runtime::StackTraceId> currentExternalStackTrace();
+ std::unique_ptr<protocol::Runtime::StackTraceId> currentScheduledAsyncCall();
void setPauseOnExceptionsImpl(int);
diff --git a/deps/v8/src/inspector/v8-debugger.cc b/deps/v8/src/inspector/v8-debugger.cc
index 8f843b54b2..c86f320252 100644
--- a/deps/v8/src/inspector/v8-debugger.cc
+++ b/deps/v8/src/inspector/v8-debugger.cc
@@ -331,11 +331,7 @@ void V8Debugger::pauseOnAsyncCall(int targetContextGroupId, uintptr_t task,
m_targetContextGroupId = targetContextGroupId;
m_taskWithScheduledBreak = reinterpret_cast<void*>(task);
- String16 currentDebuggerId =
- debuggerIdToString(debuggerIdFor(targetContextGroupId));
- if (currentDebuggerId != debuggerId) {
- m_taskWithScheduledBreakDebuggerId = debuggerId;
- }
+ m_taskWithScheduledBreakDebuggerId = debuggerId;
}
Response V8Debugger::continueToLocation(
@@ -542,19 +538,18 @@ void V8Debugger::PromiseEventOccurred(v8::debug::PromiseDebugActionType type,
switch (type) {
case v8::debug::kDebugAsyncFunctionPromiseCreated:
asyncTaskScheduledForStack("async function", task, true);
- if (!isBlackboxed) asyncTaskCandidateForStepping(task);
break;
case v8::debug::kDebugPromiseThen:
asyncTaskScheduledForStack("Promise.then", task, false);
- if (!isBlackboxed) asyncTaskCandidateForStepping(task);
+ if (!isBlackboxed) asyncTaskCandidateForStepping(task, true);
break;
case v8::debug::kDebugPromiseCatch:
asyncTaskScheduledForStack("Promise.catch", task, false);
- if (!isBlackboxed) asyncTaskCandidateForStepping(task);
+ if (!isBlackboxed) asyncTaskCandidateForStepping(task, true);
break;
case v8::debug::kDebugPromiseFinally:
asyncTaskScheduledForStack("Promise.finally", task, false);
- if (!isBlackboxed) asyncTaskCandidateForStepping(task);
+ if (!isBlackboxed) asyncTaskCandidateForStepping(task, true);
break;
case v8::debug::kDebugWillHandle:
asyncTaskStartedForStack(task);
@@ -767,7 +762,7 @@ V8StackTraceId V8Debugger::storeCurrentStackTrace(
++m_asyncStacksCount;
collectOldAsyncStacksIfNeeded();
- asyncTaskCandidateForStepping(reinterpret_cast<void*>(id));
+ asyncTaskCandidateForStepping(reinterpret_cast<void*>(id), false);
return V8StackTraceId(id, debuggerIdFor(contextGroupId));
}
@@ -816,7 +811,7 @@ void V8Debugger::externalAsyncTaskFinished(const V8StackTraceId& parent) {
void V8Debugger::asyncTaskScheduled(const StringView& taskName, void* task,
bool recurring) {
asyncTaskScheduledForStack(toString16(taskName), task, recurring);
- asyncTaskCandidateForStepping(task);
+ asyncTaskCandidateForStepping(task, true);
}
void V8Debugger::asyncTaskCanceled(void* task) {
@@ -890,16 +885,23 @@ void V8Debugger::asyncTaskFinishedForStack(void* task) {
}
}
-void V8Debugger::asyncTaskCandidateForStepping(void* task) {
- if (m_pauseOnAsyncCall) {
- m_scheduledAsyncTask = task;
+void V8Debugger::asyncTaskCandidateForStepping(void* task, bool isLocal) {
+ int contextGroupId = currentContextGroupId();
+ if (m_pauseOnAsyncCall && contextGroupId) {
+ if (isLocal) {
+ m_scheduledAsyncCall = v8_inspector::V8StackTraceId(
+ reinterpret_cast<uintptr_t>(task), std::make_pair(0, 0));
+ } else {
+ m_scheduledAsyncCall = v8_inspector::V8StackTraceId(
+ reinterpret_cast<uintptr_t>(task), debuggerIdFor(contextGroupId));
+ }
breakProgram(m_targetContextGroupId);
- m_scheduledAsyncTask = nullptr;
+ m_scheduledAsyncCall = v8_inspector::V8StackTraceId();
return;
}
if (!m_stepIntoAsyncCallback) return;
DCHECK(m_targetContextGroupId);
- if (currentContextGroupId() != m_targetContextGroupId) return;
+ if (contextGroupId != m_targetContextGroupId) return;
m_taskWithScheduledBreak = task;
v8::debug::ClearStepping(m_isolate);
m_stepIntoAsyncCallback->sendSuccess();
@@ -1031,6 +1033,7 @@ std::pair<int64_t, int64_t> V8Debugger::debuggerIdFor(int contextGroupId) {
std::pair<int64_t, int64_t> debuggerId(
v8::debug::GetNextRandomInt64(m_isolate),
v8::debug::GetNextRandomInt64(m_isolate));
+ if (!debuggerId.first && !debuggerId.second) ++debuggerId.first;
m_contextGroupIdToDebuggerId.insert(
it, std::make_pair(contextGroupId, debuggerId));
m_serializedDebuggerIdToDebuggerId.insert(
diff --git a/deps/v8/src/inspector/v8-debugger.h b/deps/v8/src/inspector/v8-debugger.h
index 455bb5952d..4828fcad52 100644
--- a/deps/v8/src/inspector/v8-debugger.h
+++ b/deps/v8/src/inspector/v8-debugger.h
@@ -117,7 +117,9 @@ class V8Debugger : public v8::debug::DebugDelegate {
void setMaxAsyncTaskStacksForTest(int limit);
void dumpAsyncTaskStacksStateForTest();
- void* scheduledAsyncTask() { return m_scheduledAsyncTask; }
+ v8_inspector::V8StackTraceId scheduledAsyncCall() {
+ return m_scheduledAsyncCall;
+ }
std::pair<int64_t, int64_t> debuggerIdFor(int contextGroupId);
std::pair<int64_t, int64_t> debuggerIdFor(
@@ -155,7 +157,7 @@ class V8Debugger : public v8::debug::DebugDelegate {
void asyncTaskStartedForStack(void* task);
void asyncTaskFinishedForStack(void* task);
- void asyncTaskCandidateForStepping(void* task);
+ void asyncTaskCandidateForStepping(void* task, bool isLocal);
void asyncTaskStartedForStepping(void* task);
void asyncTaskFinishedForStepping(void* task);
void asyncTaskCanceledForStepping(void* task);
@@ -219,7 +221,7 @@ class V8Debugger : public v8::debug::DebugDelegate {
v8::debug::ExceptionBreakState m_pauseOnExceptionsState;
bool m_pauseOnAsyncCall = false;
- void* m_scheduledAsyncTask = nullptr;
+ v8_inspector::V8StackTraceId m_scheduledAsyncCall;
using StackTraceIdToStackTrace =
protocol::HashMap<uintptr_t, std::weak_ptr<AsyncStackTrace>>;
diff --git a/deps/v8/src/inspector/v8-heap-profiler-agent-impl.cc b/deps/v8/src/inspector/v8-heap-profiler-agent-impl.cc
index 8af3edf7e1..b876a956b2 100644
--- a/deps/v8/src/inspector/v8-heap-profiler-agent-impl.cc
+++ b/deps/v8/src/inspector/v8-heap-profiler-agent-impl.cc
@@ -63,7 +63,7 @@ class GlobalObjectNameResolver final
if (m_offset + length + 1 >= m_strings.size()) return "";
for (size_t i = 0; i < length; ++i) {
UChar ch = name[i];
- m_strings[m_offset + i] = ch > 0xff ? '?' : static_cast<char>(ch);
+ m_strings[m_offset + i] = ch > 0xFF ? '?' : static_cast<char>(ch);
}
m_strings[m_offset + length] = '\0';
char* result = &*m_strings.begin() + m_offset;
diff --git a/deps/v8/src/inspector/v8-injected-script-host.cc b/deps/v8/src/inspector/v8-injected-script-host.cc
index ef978ceda3..1455cf6dbc 100644
--- a/deps/v8/src/inspector/v8-injected-script-host.cc
+++ b/deps/v8/src/inspector/v8-injected-script-host.cc
@@ -44,6 +44,15 @@ V8InspectorImpl* unwrapInspector(
return inspector;
}
+template <typename TypedArray>
+void addTypedArrayProperty(std::vector<v8::Local<v8::Value>>* props,
+ v8::Isolate* isolate,
+ v8::Local<v8::ArrayBuffer> arraybuffer,
+ String16 name, size_t length) {
+ props->push_back(toV8String(isolate, name));
+ props->push_back(TypedArray::New(arraybuffer, 0, length));
+}
+
} // namespace
v8::Local<v8::Object> V8InjectedScriptHost::create(
@@ -84,6 +93,9 @@ v8::Local<v8::Object> V8InjectedScriptHost::create(
setFunctionProperty(context, injectedScriptHost, "nativeAccessorDescriptor",
V8InjectedScriptHost::nativeAccessorDescriptorCallback,
debuggerExternal);
+ setFunctionProperty(context, injectedScriptHost, "typedArrayProperties",
+ V8InjectedScriptHost::typedArrayPropertiesCallback,
+ debuggerExternal);
createDataProperty(context, injectedScriptHost,
toV8StringInternalized(isolate, "keys"),
v8::debug::GetBuiltin(isolate, v8::debug::kObjectKeys));
@@ -335,7 +347,7 @@ void V8InjectedScriptHost::proxyTargetValueCallback(
UNREACHABLE();
return;
}
- v8::Local<v8::Object> target = info[0].As<v8::Proxy>();
+ v8::Local<v8::Value> target = info[0].As<v8::Proxy>();
while (target->IsProxy())
target = v8::Local<v8::Proxy>::Cast(target)->GetTarget();
info.GetReturnValue().Set(target);
@@ -374,4 +386,40 @@ void V8InjectedScriptHost::nativeAccessorDescriptorCallback(
info.GetReturnValue().Set(result);
}
+void V8InjectedScriptHost::typedArrayPropertiesCallback(
+ const v8::FunctionCallbackInfo<v8::Value>& info) {
+ v8::Isolate* isolate = info.GetIsolate();
+ if (info.Length() != 1 || !info[0]->IsArrayBuffer()) return;
+
+ v8::TryCatch tryCatch(isolate);
+ v8::Isolate::DisallowJavascriptExecutionScope throwJs(
+ isolate, v8::Isolate::DisallowJavascriptExecutionScope::THROW_ON_FAILURE);
+ v8::Local<v8::ArrayBuffer> arrayBuffer = info[0].As<v8::ArrayBuffer>();
+ size_t length = arrayBuffer->ByteLength();
+ if (length == 0) return;
+ std::vector<v8::Local<v8::Value>> arrays_vector;
+ addTypedArrayProperty<v8::Int8Array>(&arrays_vector, isolate, arrayBuffer,
+ "[[Int8Array]]", length);
+ addTypedArrayProperty<v8::Uint8Array>(&arrays_vector, isolate, arrayBuffer,
+ "[[Uint8Array]]", length);
+
+ if (length % 2 == 0) {
+ addTypedArrayProperty<v8::Int16Array>(&arrays_vector, isolate, arrayBuffer,
+ "[[Int16Array]]", length / 2);
+ }
+ if (length % 4 == 0) {
+ addTypedArrayProperty<v8::Int32Array>(&arrays_vector, isolate, arrayBuffer,
+ "[[Int32Array]]", length / 4);
+ }
+
+ if (tryCatch.HasCaught()) return;
+ v8::Local<v8::Context> context = isolate->GetCurrentContext();
+ v8::Local<v8::Array> arrays =
+ v8::Array::New(isolate, static_cast<uint32_t>(arrays_vector.size()));
+ for (uint32_t i = 0; i < static_cast<uint32_t>(arrays_vector.size()); i++)
+ createDataProperty(context, arrays, i, arrays_vector[i]);
+ if (tryCatch.HasCaught()) return;
+ info.GetReturnValue().Set(arrays);
+}
+
} // namespace v8_inspector
diff --git a/deps/v8/src/inspector/v8-injected-script-host.h b/deps/v8/src/inspector/v8-injected-script-host.h
index 491a157ea8..18f9139d63 100644
--- a/deps/v8/src/inspector/v8-injected-script-host.h
+++ b/deps/v8/src/inspector/v8-injected-script-host.h
@@ -44,6 +44,8 @@ class V8InjectedScriptHost {
const v8::FunctionCallbackInfo<v8::Value>&);
static void nativeAccessorDescriptorCallback(
const v8::FunctionCallbackInfo<v8::Value>&);
+ static void typedArrayPropertiesCallback(
+ const v8::FunctionCallbackInfo<v8::Value>&);
};
} // namespace v8_inspector
diff --git a/deps/v8/src/inspector/v8-inspector-session-impl.cc b/deps/v8/src/inspector/v8-inspector-session-impl.cc
index 6fba10ff11..d580c41e30 100644
--- a/deps/v8/src/inspector/v8-inspector-session-impl.cc
+++ b/deps/v8/src/inspector/v8-inspector-session-impl.cc
@@ -262,8 +262,9 @@ Response V8InspectorSessionImpl::unwrapObject(const String16& objectId,
std::unique_ptr<protocol::Runtime::API::RemoteObject>
V8InspectorSessionImpl::wrapObject(v8::Local<v8::Context> context,
v8::Local<v8::Value> value,
- const StringView& groupName) {
- return wrapObject(context, value, toString16(groupName), false);
+ const StringView& groupName,
+ bool generatePreview) {
+ return wrapObject(context, value, toString16(groupName), generatePreview);
}
std::unique_ptr<protocol::Runtime::RemoteObject>
diff --git a/deps/v8/src/inspector/v8-inspector-session-impl.h b/deps/v8/src/inspector/v8-inspector-session-impl.h
index adac6f1a85..4fb924f749 100644
--- a/deps/v8/src/inspector/v8-inspector-session-impl.h
+++ b/deps/v8/src/inspector/v8-inspector-session-impl.h
@@ -85,8 +85,8 @@ class V8InspectorSessionImpl : public V8InspectorSession,
v8::Local<v8::Value>*, v8::Local<v8::Context>*,
std::unique_ptr<StringBuffer>* objectGroup) override;
std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject(
- v8::Local<v8::Context>, v8::Local<v8::Value>,
- const StringView& groupName) override;
+ v8::Local<v8::Context>, v8::Local<v8::Value>, const StringView& groupName,
+ bool generatePreview) override;
V8InspectorSession::Inspectable* inspectedObject(unsigned num);
static const unsigned kInspectedObjectBufferSize = 5;
diff --git a/deps/v8/src/inspector/v8-stack-trace-impl.cc b/deps/v8/src/inspector/v8-stack-trace-impl.cc
index a8aaa1158b..8c208aaf8a 100644
--- a/deps/v8/src/inspector/v8-stack-trace-impl.cc
+++ b/deps/v8/src/inspector/v8-stack-trace-impl.cc
@@ -42,6 +42,7 @@ void calculateAsyncChain(V8Debugger* debugger, int contextGroupId,
// not happen if we have proper instrumentation, but let's double-check to be
// safe.
if (contextGroupId && *asyncParent &&
+ (*asyncParent)->externalParent().IsInvalid() &&
(*asyncParent)->contextGroupId() != contextGroupId) {
asyncParent->reset();
*externalParent = V8StackTraceId();
@@ -338,14 +339,15 @@ std::shared_ptr<AsyncStackTrace> AsyncStackTrace::capture(
// but doesn't synchronous we can merge them together. e.g. Promise
// ThenableJob.
if (asyncParent && frames.empty() &&
- asyncParent->m_description == description) {
+ (asyncParent->m_description == description || description.isEmpty())) {
return asyncParent;
}
- DCHECK(contextGroupId || asyncParent);
+ DCHECK(contextGroupId || asyncParent || !externalParent.IsInvalid());
if (!contextGroupId && asyncParent) {
contextGroupId = asyncParent->m_contextGroupId;
}
+
return std::shared_ptr<AsyncStackTrace>(
new AsyncStackTrace(contextGroupId, description, std::move(frames),
asyncParent, externalParent));
@@ -362,7 +364,7 @@ AsyncStackTrace::AsyncStackTrace(
m_frames(std::move(frames)),
m_asyncParent(asyncParent),
m_externalParent(externalParent) {
- DCHECK(m_contextGroupId);
+ DCHECK(m_contextGroupId || (!externalParent.IsInvalid() && m_frames.empty()));
}
std::unique_ptr<protocol::Runtime::StackTrace>
diff --git a/deps/v8/src/inspector/v8-stack-trace-impl.h b/deps/v8/src/inspector/v8-stack-trace-impl.h
index b8314c8fc4..08d98110ae 100644
--- a/deps/v8/src/inspector/v8-stack-trace-impl.h
+++ b/deps/v8/src/inspector/v8-stack-trace-impl.h
@@ -120,6 +120,7 @@ class AsyncStackTrace {
const String16& description() const;
std::weak_ptr<AsyncStackTrace> parent() const;
bool isEmpty() const;
+ const V8StackTraceId& externalParent() const { return m_externalParent; }
const std::vector<std::shared_ptr<StackFrame>>& frames() const {
return m_frames;
diff --git a/deps/v8/src/inspector/v8-value-utils.cc b/deps/v8/src/inspector/v8-value-utils.cc
index f32369df36..3835f34f6d 100644
--- a/deps/v8/src/inspector/v8-value-utils.cc
+++ b/deps/v8/src/inspector/v8-value-utils.cc
@@ -85,6 +85,7 @@ protocol::Response toProtocolValue(v8::Local<v8::Context> context,
v8::Local<v8::Value> property;
if (!object->Get(context, name).ToLocal(&property))
return Response::InternalError();
+ if (property->IsUndefined()) continue;
std::unique_ptr<protocol::Value> propertyValue;
Response response =
toProtocolValue(context, property, maxDepth, &propertyValue);