Firebug 调试技巧之console API
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. Call console.groupEnd()
to close the block.
console.groupCollapsed(object[, object, ...])
Like console.group()
, but the block is initially collapsed.
console.groupEnd()
Closes the most recently opened block created by a call to console.group()
or console.groupCollapsed()
console.time(name)
Creates a new timer under the given name. Call console.timeEnd()
with the same name to stop the timer and print the time elapsed.
console.timeEnd(name)
Stops a timer created by a call to console.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 where count
was 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.
Firebug 调试技巧之console API的更多相关文章
- JavaScript调试技巧之console.log()详解
JavaScript调试技巧之console.log()详解 对于JavaScript程序的调试,相比于alert(),使用console.log()是一种更好的方式,原因在于:alert()函数会阻 ...
- JavaScript调试技巧之console.log()详解--2015-08-07
对于JavaScript程序的调试,相比于alert(),使用console.log()是一种更好的方式,原因在于:alert()函数会阻断 JavaScript程序的执行,从而造成副作用:而cons ...
- JavaScript调试技巧之console.log()
与alert()函数类似,console.log()也可以接受变量并将其与别的字符串进行拼接: 代码如下: //Use variable var name = "Bob"; con ...
- 推荐几个不错的console调试技巧
在我们的日常前端开发中,使用最频繁的莫过于使用console.log在浏览器的控制台中打印出我们需要调试的信息,但是大部分人可能跟之前的我一样,没有意识到其实console除了log方法以外,还有很多 ...
- 前台console调试技巧
前台console调试技巧 一.console.log() 二.console.warn() 三.console.dir() 四.console.table() 五.console.assert() ...
- Firebug Console API
原文发布时间为:2011-06-06 -- 来源于本人的百度文章 [由搬家工具导入] Console API 当打开 firebug (也包括 Chrome 等浏览器的自带调试工具),window 下 ...
- Console API 与命令行
一.Console API 当打开 firebug (也包括 Chrome 等浏览器的自带调试工具),window 下面会注册一个叫做 console 的对象,它提供多种方法向控制台输出信息,供开发人 ...
- Google调试技巧总结
工欲善其事 工欲善其事,必先利器. Google调试面板一一介绍:F12回想一下大家都应该知道,哈哈 element面板 这个面板显示了页面所有html代码.用于调试css代码.右側展示左側相应选择元 ...
- 前端开发中的JS调试技巧
前言:调试技巧,在任何一项技术研发中都可谓是必不可少的技能.掌握各种调试技巧,必定能在工作中起到事半功倍的效果.譬如,快速定位问题.降低故障概率.帮助分析逻辑错误等等.而在互联网前端开发越来越重要的今 ...
随机推荐
- 一步步学Mybatis-怎么样实现动态SQL查询(6)
上一章我们已经讲完了关于Mybatis的分页用法,其实MyBatis 还具有的一个强大的特性之一通常是它的动态 SQL 能力. 如果你有使用 JDBC 或其他 相似框架的经验,你就明白要动态的串联 S ...
- 网易新闻优化APK下载链接
你好,欢迎你的访问! 本次是APK包的下载链接: 点我下载 这是我目前实现的效果,正在完善中...
- 如何在XAF中显示自定义窗体和控件
https://www.devexpress.com/Support/Center/Example/Details/E911
- JavaScript实现http地址自动检测并添加URL链接
一.天生我材必有用 给http字符自动添加URL链接是比较常见的一项功能.举两个我最近常用到的自动检测http://地址并添加链接的例子吧,首先是QQ邮箱,在使用QQ邮箱时,如果输入了URL地址(ht ...
- iOS开发——测试篇&breakpoints、lldb 和 chisel 的详解
breakpoints.lldb 和 chisel 的详解 Breakpoints BreakPoint分类 breakpoint也是有分类的,我这里的文章内大致按使用的方式分为了 Normal Br ...
- ios开发——实用技术篇Swift篇&播放MP3
播放MP3 // MARK: - 播放MP3 /*----- mp3 ------*/ //定时器- func updateTime() { //获取音频播放器播放的进度,单位秒 var cuTime ...
- SSIS 64位环境访问Oracle11g
SSIS 为了要能够在64位的机器上面让SSIS存取Oracle,当然需要安装64位的Oracle Provider,但是遇到最大的问题在于SSIS在执行的时候分成两种组件,分别是DTExec.exe ...
- 代码片段 - Golang 实现简单的 Web 服务器
------------------------------ 下面一段代码,实现了最简单的 Web 服务器: 编译环境: Linux Mint 18 Cinnamon 64-bit Golang 1. ...
- Spring MVC @RequestMapping Annotation Example with Controller, Methods, Headers, Params, @RequestParam, @PathVariable--转载
原文地址: @RequestMapping is one of the most widely used Spring MVC annotation.org.springframework.web.b ...
- java中set和get方法的理解
对于JAVA初学者来说,set和get这两个方法似乎已经很熟悉了,这两个方法是JAVA变成中的基本用法,也是出现频率相当高的两个方法. 为了让JAVA初学者能更好的理解这两个方法的使用和意义,今天笔者 ...