-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathConsole.json
More file actions
164 lines (164 loc) · 8.78 KB
/
Console.json
File metadata and controls
164 lines (164 loc) · 8.78 KB
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
{
"domain": "Console",
"description": "Console domain defines methods and events for interaction with the JavaScript console. Console collects messages created by means of the <a href='http://getfirebug.com/wiki/index.php/Console_API'>JavaScript Console API</a>. One needs to enable this domain using <code>enable</code> command in order to start receiving the console messages. Browser collects messages issued while console domain is not enabled as well and reports them using <code>messageAdded</code> notification upon enabling.",
"debuggableTypes": ["itml", "javascript", "service-worker", "web-page", "wasm-debugger"],
"targetTypes": ["itml", "javascript", "frame", "page", "service-worker", "worker", "wasm-debugger"],
"types": [
{
"id": "ChannelSource",
"type": "string",
"enum": [
"xml",
"javascript",
"network",
"console-api",
"storage",
"rendering",
"css",
"accessibility",
"security",
"content-blocker",
"media",
"mediasource",
"webrtc",
"itp-debug",
"private-click-measurement",
"payment-request",
"other"
],
"description": "Channels for different types of log messages."
},
{
"id": "ChannelLevel",
"type": "string",
"enum": ["off", "basic", "verbose"],
"description": "Level of logging."
},
{
"id": "ClearReason",
"type": "string",
"enum": ["console-api", "frontend", "main-frame-navigation"],
"description": "The reason the console is being cleared."
},
{
"id": "Channel",
"description": "Logging channel.",
"type": "object",
"properties": [
{ "name": "source", "$ref": "ChannelSource" },
{ "name": "level", "$ref": "ChannelLevel" }
]
},
{
"id": "ConsoleMessage",
"type": "object",
"description": "Console message.",
"properties": [
{ "name": "source", "$ref": "ChannelSource"},
{ "name": "level", "type": "string", "enum": ["log", "info", "warning", "error", "debug"], "description": "Message severity." },
{ "name": "text", "type": "string", "description": "Message text." },
{ "name": "type", "type": "string", "optional": true, "enum": ["log", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "timing", "profile", "profileEnd", "image"], "description": "Console message type." },
{ "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." },
{ "name": "column", "type": "integer", "optional": true, "description": "Column number on the line in the resource that generated this message." },
{ "name": "repeatCount", "type": "integer", "optional": true, "description": "Repeat count for repeated messages." },
{ "name": "parameters", "type": "array", "items": { "$ref": "Runtime.RemoteObject" }, "optional": true, "description": "Message parameters in case of the formatted message." },
{ "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." },
{ "name": "networkRequestId", "$ref": "Network.RequestId", "optional": true, "description": "Identifier of the network request associated with this message." },
{ "name": "timestamp", "type": "number", "optional": true, "description": "Time when this message was added. Currently only used when an expensive operation happens to make sure that the frontend can account for it." }
]
},
{
"id": "CallFrame",
"type": "object",
"description": "Stack entry for console errors and assertions.",
"properties": [
{ "name": "functionName", "type": "string", "description": "JavaScript function name." },
{ "name": "url", "type": "string", "description": "JavaScript script name or url." },
{ "name": "scriptId", "$ref": "Debugger.ScriptId", "description": "Script identifier." },
{ "name": "lineNumber", "type": "integer", "description": "JavaScript script line number." },
{ "name": "columnNumber", "type": "integer", "description": "JavaScript script column number." }
]
},
{
"id": "StackTrace",
"description": "Call frames for async function calls, console assertions, and error messages.",
"type": "object",
"properties": [
{ "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" } },
{ "name": "topCallFrameIsBoundary", "type": "boolean", "optional": true, "description": "Whether the first item in <code>callFrames</code> is the native function that scheduled the asynchronous operation (e.g. setTimeout)." },
{ "name": "truncated", "type": "boolean", "optional": true, "description": "Whether one or more frames have been truncated from the bottom of the stack." },
{ "name": "parentStackTrace", "$ref": "StackTrace", "optional": true, "description": "Parent StackTrace." }
]
}
],
"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": "Clears console messages collected in the browser."
},
{
"name": "setConsoleClearAPIEnabled",
"description": "Control whether calling <code>console.clear()</code> has an effect in Web Inspector. Defaults to true.",
"parameters": [
{ "name": "enable", "type": "boolean" }
]
},
{
"name": "getLoggingChannels",
"description": "List of the different message sources that are non-default logging channels.",
"returns": [
{ "name": "channels", "type": "array", "items": { "$ref": "Channel"}, "description": "Logging channels." }
]
},
{
"name": "setLoggingChannelLevel",
"description": "Modify the level of a channel.",
"parameters": [
{ "name": "source", "$ref": "ChannelSource", "description": "Logging channel to modify." },
{ "name": "level", "$ref": "ChannelLevel", "description": "New level." }
]
}
],
"events": [
{
"name": "messageAdded",
"description": "Issued when new console message is added.",
"parameters": [
{ "name": "message", "$ref": "ConsoleMessage", "description": "Console message that has been added." }
]
},
{
"name": "messageRepeatCountUpdated",
"description": "Issued when subsequent message(s) are equal to the previous one(s).",
"parameters": [
{ "name": "count", "type": "integer", "description": "New repeat count value." },
{ "name": "timestamp", "type": "number", "optional": true, "description": "Timestamp of the latest message." }
]
},
{
"name": "messagesCleared",
"description": "Issued when console is cleared. This happens either upon <code>clearMessages</code> command or after page navigation.",
"parameters": [
{ "name": "reason", "$ref": "ClearReason", "description": "The reason the console is being cleared." }
]
},
{
"name": "heapSnapshot",
"description": "Issued from console.takeHeapSnapshot.",
"parameters": [
{ "name": "timestamp", "type": "number" },
{ "name": "snapshotData", "$ref": "Heap.HeapSnapshotData", "description": "Snapshot at the end of tracking." },
{ "name": "title", "type": "string", "optional": true, "description": "Optional title provided to console.takeHeapSnapshot." }
]
}
]
}