1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 "namespace": "debugger",
8 "description": "The <code>chrome.debugger</code> API serves as an alternate transport for Chrome's <a href='http://code.google.com/chrome/devtools/docs/remote-debugging.html'>remote debugging protocol</a>. Use <code>chrome.debugger</code> to attach to one or more tabs to instrument network interaction, debug JavaScript, mutate the DOM and CSS, etc. Use the Debuggee <code>tabId</code> to target tabs with sendCommand and route events by <code>tabId</code> from onEvent callbacks.",
13 "description": "Debuggee identifier. Either tabId or extensionId must be specified",
15 "tabId": { "type": "integer", "optional": true, "description": "The id of the tab which you intend to debug." },
16 "extensionId": { "type": "string", "optional": true, "description": "The id of the extension which you intend to debug. Attaching to an extension background page is only possible when 'enable-silent-debugging' flag is enabled on the target browser." },
17 "targetId": { "type": "string", "optional": true, "description": "The opaque id of the debug target." }
23 "description": "Debug target information",
27 "description": "Target type.",
28 "enum" : ["page", "background_page", "worker", "other" ]
30 "id": { "type": "string", "description": "Target id." },
31 "tabId": { "type": "integer", "optional": true, "description": "The tab id, defined if type == 'page'." },
32 "extensionId": { "type": "string", "optional": true, "description": "The extension id, defined if type = 'background_page'." },
33 "attached": { "type": "boolean", "description": "True if debugger is already attached." },
34 "title": { "type": "string", "description": "Target page title." },
35 "url": { "type": "string", "description": "Target URL." },
36 "faviconUrl": { "type": "string", "optional": true, "description": "Target favicon URL." }
44 "description": "Attaches debugger to the given target.",
49 "description": "Debugging target to which you want to attach."
53 "name": "requiredVersion",
54 "description": "Required debugging protocol version (\"0.1\"). One can only attach to the debuggee with matching major version and greater or equal minor version. List of the protocol versions can be obtained <a href='http://code.google.com/chrome/devtools/docs/remote-debugging.html'>here</a>."
61 "description": "Called once the attach operation succeeds or fails. Callback receives no arguments. If the attach fails, $(ref:runtime.lastError) will be set to the error message."
68 "description": "Detaches debugger from the given target.",
73 "description": "Debugging target from which you want to detach."
80 "description": "Called once the detach operation succeeds or fails. Callback receives no arguments. If the detach fails, $(ref:runtime.lastError) will be set to the error message."
85 "name": "sendCommand",
87 "description": "Sends given command to the debugging target.",
92 "description": "Debugging target to which you want to send the command."
97 "description": "Method name. Should be one of the methods defined by the <a href='http://code.google.com/chrome/devtools/docs/remote-debugging.html'>remote debugging protocol</a>."
101 "name": "commandParams",
103 "additionalProperties": { "type": "any" },
104 "description": "JSON object with request parameters. This object must conform to the remote debugging params scheme for given method."
115 "additionalProperties": { "type": "any" },
116 "description": "JSON object with the response. Structure of the response varies depending on the method name and is defined by the 'returns' attribute of the command description in the remote debugging protocol."
119 "description": "Response body. If an error occurs while posting the message, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message."
124 "name": "getTargets",
126 "description": "Returns the list of available debug targets.",
135 "items": {"$ref": "TargetInfo"},
136 "description": "Array of TargetInfo objects corresponding to the available debug targets."
147 "description": "Fired whenever debugging target issues instrumentation event.",
152 "description": "The debuggee that generated this event."
157 "description": "Method name. Should be one of the notifications defined by the <a href='http://code.google.com/chrome/devtools/docs/remote-debugging.html'>remote debugging protocol</a>."
163 "additionalProperties": { "type": "any" },
164 "description": "JSON object with the parameters. Structure of the parameters varies depending on the method name and is defined by the 'parameters' attribute of the event description in the remote debugging protocol."
171 "description": "Fired when browser terminates debugging session for the tab. This happens when either the tab is being closed or Chrome DevTools is being invoked for the attached tab.",
176 "description": "The debuggee that was detached."
181 "description": "Connection termination reason.",
182 "enum": [ "target_closed", "canceled_by_user", "replaced_with_devtools" ]