console
方法
debug()
outputs a message to the web console at the "debug" log level. The message is only displayed to the user if the console is configured to display debug output.
console.debug(obj1 [, obj2, ..., objN]); console.debug(msg [, subst1, ..., substN]);
obj1
...
objN
A list of JavaScript objects to output. The string representations of each of these objects are appended together in the order listed and output to the console.
msg
subst1
透过
substN
in consecutive order.
subst1
...
substN
msg
. This gives you additional control over the format of the output. See
使用字符串代入
in
console
for a description of how substitutions work.
见
把文本输出到控制台
in the documentation of the
console
object for details.
| 规范 | 状态 | 注释 |
|---|---|---|
|
控制台 API
The definition of 'console.debug()' in that specification. |
实时标准 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
debug
|
Chrome Yes | Edge 12 | Firefox 4 | IE Yes | Opera ? | Safari Yes | WebView Android Yes | Chrome Android Yes | Firefox Android 4 | Opera Android ? | Safari iOS ? | Samsung Internet Android Yes |
| Substitution strings |
Chrome
Yes
注意事项
|
Edge
12
注意事项
|
Firefox 9 |
IE
10
注意事项
|
Opera ? | Safari ? |
WebView Android
Yes
注意事项
|
Chrome Android
Yes
注意事项
|
Firefox Android 9 | Opera Android ? | Safari iOS ? |
Samsung Internet Android
Yes
注意事项
|
完整支持
兼容性未知
见实现注意事项。