diff options
Diffstat (limited to 'Source/JavaScriptCore/inspector/protocol/Debugger.json')
-rw-r--r-- | Source/JavaScriptCore/inspector/protocol/Debugger.json | 115 |
1 files changed, 86 insertions, 29 deletions
diff --git a/Source/JavaScriptCore/inspector/protocol/Debugger.json b/Source/JavaScriptCore/inspector/protocol/Debugger.json index d80edeb3b..7b63fea46 100644 --- a/Source/JavaScriptCore/inspector/protocol/Debugger.json +++ b/Source/JavaScriptCore/inspector/protocol/Debugger.json @@ -1,6 +1,7 @@ { "domain": "Debugger", "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.", + "workerSupported": true, "types": [ { "id": "BreakpointId", @@ -37,7 +38,8 @@ "type": "object", "properties": [ { "name": "type", "type": "string", "enum": ["log", "evaluate", "sound", "probe"], "description": "Different kinds of breakpoint actions." }, - { "name": "data", "type": "string", "optional": true, "description": "Data associated with this breakpoint type (e.g. for type \"eval\" this is the JavaScript string to evalulate)." } + { "name": "data", "type": "string", "optional": true, "description": "Data associated with this breakpoint type (e.g. for type \"eval\" this is the JavaScript string to evalulate)." }, + { "name": "id", "$ref": "BreakpointActionIdentifier", "optional": true, "description": "A frontend-assigned identifier for this breakpoint action." } ], "description": "Action to perform when a breakpoint is triggered." }, @@ -47,7 +49,8 @@ "properties": [ { "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." }, { "name": "actions", "type": "array", "optional": true, "items": { "$ref": "BreakpointAction" }, "description": "Actions to perform automatically when the breakpoint is triggered." }, - { "name": "autoContinue", "type": "boolean", "optional": true, "description": "Automatically continue after hitting this breakpoint and running actions." } + { "name": "autoContinue", "type": "boolean", "optional": true, "description": "Automatically continue after hitting this breakpoint and running actions." }, + { "name": "ignoreCount", "type": "integer", "optional": true, "description": "Number of times to ignore this breakpoint, before stopping on the breakpoint and running actions." } ], "description": "Extra options that modify breakpoint behavior." }, @@ -58,7 +61,6 @@ { "name": "location", "$ref": "Location", "description": "Location of the function." }, { "name": "name", "type": "string", "optional": true, "description": "Name of the function. Not present for anonymous functions." }, { "name": "displayName", "type": "string", "optional": true, "description": "Display name of the function(specified in 'displayName' property on the function object)." }, - { "name": "inferredName", "type": "string", "optional": true, "description": "Name of the function inferred from its initial assignment." }, { "name": "scopeChain", "type": "array", "optional": true, "items": { "$ref": "Scope" }, "description": "Scope chain for this closure." } ], "description": "Information about the function." @@ -71,7 +73,8 @@ { "name": "functionName", "type": "string", "description": "Name of the JavaScript function called on this call frame." }, { "name": "location", "$ref": "Location", "description": "Location in the source code." }, { "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": "this", "$ref": "Runtime.RemoteObject", "description": "<code>this</code> object for this call frame." }, + { "name": "isTailDeleted", "type": "boolean", "description": "Is the current frame tail deleted from a tail call." } ], "description": "JavaScript call frame. Array of call frames form the call stack." }, @@ -79,8 +82,11 @@ "id": "Scope", "type": "object", "properties": [ - { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch"], "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": "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": "type", "type": "string", "enum": ["global", "with", "closure", "catch", "functionName", "globalLexicalEnvironment", "nestedLexical"], "description": "Scope type." }, + { "name": "name", "type": "string", "optional": true, "description": "Name associated with the scope." }, + { "name": "location", "$ref": "Location", "optional": true, "description": "Location if available of the scope definition." }, + { "name": "empty", "type": "boolean", "optional": true, "description": "Whether the scope has any variables." } ], "description": "Scope description." }, @@ -95,6 +101,30 @@ { "name": "timestamp", "type": "number", "description": "Timestamp of when the sample was taken." }, { "name": "payload", "$ref": "Runtime.RemoteObject", "description": "Contents of the sample." } ] + }, + { + "id": "AssertPauseReason", + "description": "The pause reason auxiliary data when paused because of an assertion.", + "type": "object", + "properties": [ + { "name": "message", "type": "string", "optional": true, "description": "The console.assert message string if provided." } + ] + }, + { + "id": "BreakpointPauseReason", + "description": "The pause reason auxiliary data when paused because of hitting a breakpoint.", + "type": "object", + "properties": [ + { "name": "breakpointId", "type": "string", "description": "The identifier of the breakpoint causing the pause." } + ] + }, + { + "id": "CSPViolationPauseReason", + "description": "The pause reason auxiliary data when paused because of a Content Security Policy directive.", + "type": "object", + "properties": [ + { "name": "directive", "type": "string", "description": "The CSP directive that blocked script execution." } + ] } ], "commands": [ @@ -107,6 +137,13 @@ "description": "Disables debugger for given page." }, { + "name": "setAsyncStackTraceDepth", + "description": "Set the async stack trace depth for the page. A value of zero disables recording of async stack traces.", + "parameters": [ + { "name": "depth", "type": "integer", "description": "Async stack trace depth." } + ] + }, + { "name": "setBreakpointsActive", "parameters": [ { "name": "active", "type": "boolean", "description": "New value for breakpoints active state." } @@ -124,8 +161,7 @@ ], "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." }, - { "name": "breakpointActionIdentifiers", "type": "array", "items": { "$ref": "BreakpointActionIdentifier" }, "description": "Assigned breakpoint action identifiers." } + { "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." }, @@ -137,8 +173,7 @@ ], "returns": [ { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." }, - { "name": "actualLocation", "$ref": "Location", "description": "Location this breakpoint resolved into." }, - { "name": "breakpointActionIdentifiers", "type": "array", "items": { "$ref": "BreakpointActionIdentifier" }, "description": "Assigned breakpoint action identifiers." } + { "name": "actualLocation", "$ref": "Location", "description": "Location this breakpoint resolved into." } ], "description": "Sets JavaScript breakpoint at a given location." }, @@ -150,23 +185,27 @@ "description": "Removes JavaScript breakpoint." }, { + "name": "continueUntilNextRunLoop", + "description": "Continues execution until the current evaluation completes. This will trigger either a Debugger.paused or Debugger.resumed event." + }, + { "name": "continueToLocation", + "description": "Continues execution until specific location is reached. This will trigger either a Debugger.paused or Debugger.resumed event.", "parameters": [ { "name": "location", "$ref": "Location", "description": "Location to continue to." } - ], - "description": "Continues execution until specific location is reached." + ] }, { "name": "stepOver", - "description": "Steps over the statement." + "description": "Steps over the statement. This will trigger either a Debugger.paused or Debugger.resumed event." }, { "name": "stepInto", - "description": "Steps into the function call." + "description": "Steps into the function call. This will trigger either a Debugger.paused or Debugger.resumed event." }, { "name": "stepOut", - "description": "Steps out of the function call." + "description": "Steps out of the function call. This will trigger either a Debugger.paused or Debugger.resumed event." }, { "name": "pause", @@ -174,20 +213,20 @@ }, { "name": "resume", - "description": "Resumes JavaScript execution." + "description": "Resumes JavaScript execution. This will trigger a Debugger.resumed event." }, { "name": "searchInContent", + "description": "Searches for given string in script content.", "parameters": [ { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to search in." }, - { "name": "query", "type": "string", "description": "String to search for." }, + { "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": "GenericTypes.SearchMatch" }, "description": "List of search matches." } - ], - "description": "Searches for given string in script content." + ] }, { "name": "getScriptSource", @@ -207,14 +246,21 @@ "returns": [ { "name": "details", "$ref": "FunctionDetails", "description": "Information about the function." } ], - "description": "Returns detailed informtation on given function." + "description": "Returns detailed information on given function." }, { "name": "setPauseOnExceptions", + "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>.", "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": "setPauseOnAssertions", + "description": "Set pause on assertions state. Assertions are console.assert assertions.", + "parameters": [ + { "name": "enabled", "type": "boolean" } + ] }, { "name": "evaluateOnCallFrame", @@ -225,11 +271,13 @@ { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false." }, { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException 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, "description": "Whether preview should be generated for the result." } + { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result." }, + { "name": "saveResult", "type": "boolean", "optional": true, "description": "Whether the resulting value should be considered for saving in the $n history." } ], "returns": [ { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Object wrapper for the evaluation result." }, - { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." } + { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }, + { "name": "savedResultIndex", "type": "integer", "optional": true, "description": "If the result was saved, this is the $n index that can be used to access the value." } ], "description": "Evaluates expression on a given call frame." }, @@ -250,14 +298,15 @@ "name": "scriptParsed", "parameters": [ { "name": "scriptId", "$ref": "ScriptId", "description": "Identifier of the script parsed." }, - { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." }, + { "name": "url", "type": "string", "description": "URL 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": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." }, + { "name": "sourceURL", "type": "string", "optional": true, "description": "sourceURL name of the script (if any)." }, { "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": "module", "type": "boolean", "optional": true, "description": "True if this script was parsed as a module." } ], "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger." }, @@ -284,8 +333,9 @@ "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", "CSPViolation", "other" ], "description": "Pause reason." }, - { "name": "data", "type": "object", "optional": true, "description": "Object containing break-specific auxiliary properties." } + { "name": "reason", "type": "string", "enum": ["XHR", "DOM", "EventListener", "exception", "assert", "CSPViolation", "DebuggerStatement", "Breakpoint", "PauseOnNextStatement", "other"], "description": "Pause reason." }, + { "name": "data", "type": "object", "optional": true, "description": "Object containing break-specific auxiliary properties." }, + { "name": "asyncStackTrace", "$ref": "Console.StackTrace", "optional": true, "description": "Linked list of asynchronous StackTraces." } ], "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria." }, @@ -295,10 +345,17 @@ }, { "name": "didSampleProbe", - "description": "Fires when a new proben sample is collected.", + "description": "Fires when a new probe sample is collected.", "parameters": [ { "name": "sample", "$ref": "ProbeSample", "description": "A collected probe sample." } ] + }, + { + "name": "playBreakpointActionSound", + "description": "Fired when a \"sound\" breakpoint action is triggered on a breakpoint.", + "parameters": [ + { "name": "breakpointActionId", "$ref": "BreakpointActionIdentifier", "description": "Breakpoint action identifier." } + ] } ] } |