OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 [ | 5 [ |
6 { | 6 { |
7 "namespace": "debugger", | 7 "namespace": "debugger", |
8 "types": [ | 8 "types": [ |
9 { | 9 { |
10 "id": "Debuggee", | 10 "id": "Debuggee", |
11 "type": "object", | 11 "type": "object", |
12 "description": "Debuggee identifier. Either tabId or extensionId must be
specified", | 12 "description": "Debuggee identifier. Either tabId or extensionId must be
specified", |
13 "properties": { | 13 "properties": { |
14 "tabId": { "type": "integer", "optional": true, "description": "The id
of the tab which you intend to debug." }, | 14 "tabId": { "type": "integer", "optional": true, "description": "The id
of the tab which you intend to debug." }, |
15 "extensionId": { "type": "string", "optional": true, "description": "T
he id of the extension which you intend to debug. Attaching to an extension back
ground page is only possible when 'enable-silent-debugging' flag is enabled on t
he target browser." } | 15 "extensionId": { "type": "string", "optional": true, "description": "T
he id of the extension which you intend to debug. Attaching to an extension back
ground page is only possible when 'enable-silent-debugging' flag is enabled on t
he target browser." }, |
| 16 "targetId": { "type": "string", "optional": true, "description": "The
opaque id of the debug target." } |
| 17 } |
| 18 }, |
| 19 { |
| 20 "id": "TargetInfo", |
| 21 "type": "object", |
| 22 "description": "Debug target information", |
| 23 "properties": { |
| 24 "type": { |
| 25 "type": "string", |
| 26 "description": "Target type.", |
| 27 "enum" : ["page", "background_page", "other" ] |
| 28 }, |
| 29 "id": { "type": "string", "description": "Target id." }, |
| 30 "attached": { "type": "boolean", "description": "True if debugger is a
lready attached." }, |
| 31 "title": { "type": "string", "description": "Target page title." }, |
| 32 "url": { "type": "string", "description": "Target URL." }, |
| 33 "faviconUrl": { "type": "string", "optional": true, "description": "Ta
rget favicon URL." } |
16 } | 34 } |
17 } | 35 } |
18 ], | 36 ], |
19 "functions": [ | 37 "functions": [ |
20 { | 38 { |
21 "name": "attach", | 39 "name": "attach", |
22 "type": "function", | 40 "type": "function", |
23 "description": "Attaches debugger to the given target.", | 41 "description": "Attaches debugger to the given target.", |
24 "parameters": [ | 42 "parameters": [ |
25 { | 43 { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 "type": "object", | 109 "type": "object", |
92 "name": "result", | 110 "name": "result", |
93 "optional": true, | 111 "optional": true, |
94 "additionalProperties": { "type": "any" }, | 112 "additionalProperties": { "type": "any" }, |
95 "description": "JSON object with the response. Structure of the
response varies depending on the method and is defined by the remote debugging p
rotocol." | 113 "description": "JSON object with the response. Structure of the
response varies depending on the method and is defined by the remote debugging p
rotocol." |
96 } | 114 } |
97 ], | 115 ], |
98 "description": "Response body. If an error occurs while posting the
message, the callback will be called with no arguments and $ref:runtime.lastErro
r will be set to the error message." | 116 "description": "Response body. If an error occurs while posting the
message, the callback will be called with no arguments and $ref:runtime.lastErro
r will be set to the error message." |
99 } | 117 } |
100 ] | 118 ] |
| 119 }, |
| 120 { |
| 121 "name": "getTargets", |
| 122 "type": "function", |
| 123 "description": "Returns the list of available debug targets.", |
| 124 "parameters": [ |
| 125 { |
| 126 "type": "function", |
| 127 "name": "callback", |
| 128 "parameters": [ |
| 129 { |
| 130 "type": "array", |
| 131 "name": "result", |
| 132 "items": {"$ref": "TargetInfo"}, |
| 133 "description": "Array of TargetInfo objects corresponding to the
available debug targets." |
| 134 } |
| 135 ] |
| 136 } |
| 137 ] |
101 } | 138 } |
102 ], | 139 ], |
103 "events": [ | 140 "events": [ |
104 { | 141 { |
105 "name": "onEvent", | 142 "name": "onEvent", |
106 "type": "function", | 143 "type": "function", |
107 "description": "Fired whenever debugging target issues instrumentation e
vent.", | 144 "description": "Fired whenever debugging target issues instrumentation e
vent.", |
108 "parameters": [ | 145 "parameters": [ |
109 { | 146 { |
110 "$ref": "Debuggee", | 147 "$ref": "Debuggee", |
(...skipping 28 matching lines...) Expand all Loading... |
139 "type": "string", | 176 "type": "string", |
140 "name": "reason", | 177 "name": "reason", |
141 "description": "Connection termination reason.", | 178 "description": "Connection termination reason.", |
142 "enum": [ "target_closed", "canceled_by_user", "replaced_with_devtoo
ls" ] | 179 "enum": [ "target_closed", "canceled_by_user", "replaced_with_devtoo
ls" ] |
143 } | 180 } |
144 ] | 181 ] |
145 } | 182 } |
146 ] | 183 ] |
147 } | 184 } |
148 ] | 185 ] |
OLD | NEW |