Firebug 调试技巧之console API
2015-12-25 17:03
429 查看
console.log(object[, object, ...])
Writes a message to the console. You may pass as many arguments as you'd like, and they will be joined together in a space-delimited line.console.debug(object[, object, ...])
Writes a message to the console, including a hyperlink to the line where it was called.console.info(object[, object, ...])
Writes a message to the console with the visual "info" icon and color coding and a hyperlink to the line where it was called.console.warn(object[, object, ...])
Writes a message to the console with the visual "warning" icon and color coding and a hyperlink to the line where it was called.console.error(object[, object, ...])
Writes a message to the console with the visual "error" icon and color coding and a hyperlink to the line where it was called.console.assert(expression[, object, ...])
Tests that an expression is true. If not, it will write a message to the console and throw an exception.console.clear()
Clears the console.console.dir(object)
Prints an interactive listing of all properties of the object. This looks identical to the view that you would see in the DOM Panel.console.dirxml(node)
Prints the XML source tree of an HTML or XML element. This looks identical to the view that you would see in the HTML Panel. You can click on any node to inspect it in the HTML Panel.console.trace()
Prints an interactive stack trace of JavaScript execution at the point where it is called.The stack trace details the functions on the stack, as well as the values that were passed as arguments to each function. You can click each function to take you to its source in the Script tab, and click each argument value to inspect it in the DOM or HTML Panel.
console.group(object[, object, ...])
Writes a message to the console and opens a nested block to indent all future messages sent to the console. Callconsole.groupEnd()to close the block.
console.groupCollapsed(object[, object, ...])
Likeconsole.group(), but the block is initially collapsed.
console.groupEnd()
Closes the most recently opened block created by a call toconsole.group()or
console.groupCollapsed()
console.time(name)
Creates a new timer under the given name. Callconsole.timeEnd()with the same name to stop the timer and print the time elapsed.
console.timeEnd(name)
Stops a timer created by a call toconsole.time(name)and writes the time elapsed.
console.timeStamp(name)
Creates a time stamp, which can be used together with HTTP traffic timing to measure when a certain piece of code was executed.console.profile([title])
Turns on the JavaScript profiler.console.profileEnd()
Turns off the JavaScript profiler and prints its report.console.count([title])
Writes the number of times that the line of code wherecountwas called was executed.
console.exception(error-object[, object, ...])
Prints an error message together with an interactive stack trace of JavaScript execution at the point where the exception occurred.console.table(data[, columns])
Allows to log provided data using tabular layout.相关文章推荐
- extjs 按条件查询出的数据在grid上不显示
- 关于python requests 包跑ssl的设置 和 charles相关抓包的问题
- Python 练习册,每天一个小程序 -- 0002题
- 寻找view所在的viewController
- iOS 真机调试双击.cer证书
- 每日数据统计排序
- 经常碰到的xcode报错提示
- 零基础入门学习Python(20):对象(5)类和对象的内置函数
- Java和adb的环境变量配置
- virtualbox中Centos6.6和windows共享文件夹设置
- Redis 集群方案
- oracle绑定变量学习
- 查数据库部分视图或表
- SpringMVC 图片压缩下载
- 在Windows系统上搭建Nginx+Python+MySQL环境的教程
- jQuery事件对象
- 人脸检测“Joint Cascade Face Detection and Alignment”
- linux模块导出符号 EXPORT_SYMBOL_GPL EXPORT_SYMBOL
- 设计模式之单一职责原则
- 入门训练 A+B问题