1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
// Copyright (c) 2012 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.
[
{
"namespace": "debugger",
"types": [
{
"id": "Debuggee",
"type": "object",
"description": "Debuggee identifier.",
"properties": {
"tabId": { "type": "integer", "description": "The id of the tab which you intend to debug." }
}
}
],
"functions": [
{
"name": "attach",
"type": "function",
"description": "Attaches debugger to the given target.",
"parameters": [
{
"$ref": "Debuggee",
"name": "target",
"description": "Debugging target to which you want to attach."
},
{
"type": "string",
"name": "requiredVersion",
"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>."
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [],
"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."
}
]
},
{
"name": "detach",
"type": "function",
"description": "Detaches debugger from the given target.",
"parameters": [
{
"$ref": "Debuggee",
"name": "target",
"description": "Debugging target from which you want to detach."
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [],
"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."
}
]
},
{
"name": "sendCommand",
"type": "function",
"description": "Sends given command to the debugging target.",
"parameters": [
{
"$ref": "Debuggee",
"name": "target",
"description": "Debugging target to which you want to send the command."
},
{
"type": "string",
"name": "method",
"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>."
},
{
"type": "object",
"name": "commandParams",
"optional": true,
"additionalProperties": { "type": "any" },
"description": "JSON object with request parameters. This object must conform to the remote debugging params scheme for given method."
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"type": "object",
"name": "result",
"optional": true,
"additionalProperties": { "type": "any" },
"description": "JSON object with the response. Structure of the response varies depending on the method and is defined by the remote debugging protocol."
}
],
"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."
}
]
}
],
"events": [
{
"name": "onEvent",
"type": "function",
"description": "Fired whenever debugging target issues instrumentation event.",
"parameters": [
{
"$ref": "Debuggee",
"name": "source",
"description": "The debuggee that generated this event."
},
{
"type": "string",
"name": "method",
"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>."
},
{
"type": "object",
"name": "params",
"optional": true,
"additionalProperties": { "type": "any" },
"description": "JSON object with the response. Structure of the response varies depending on the method and is defined by the remote debugging protocol."
}
]
},
{
"name": "onDetach",
"type": "function",
"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.",
"parameters": [
{
"$ref": "Debuggee",
"name": "source",
"description": "The debuggee that was detached."
},
{
"type": "string",
"name": "reason",
"description": "Connection termination reason.",
"enum": [ "target_closed", "canceled_by_user", "replaced_with_devtools" ]
}
]
}
]
}
]
|