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调试技巧
前言:调试技巧,在任何一项技术研发中都可谓是必不可少的技能.掌握各种调试技巧,必定能在工作中起到事半功倍的效果.譬如,快速定位问题.降低故障概率.帮助分析逻辑错误等等.而在互联网前端开发越来越重要的今 ...
随机推荐
- Out of resources when opening file 错误解决
mysqldump: Got error: 23: Out of resources when opening file ‘./mydb/tax_calculation_rate_title.MYD’ ...
- CSS3 Animation 基于 less 构建的 css3 动画库
LESS动画优点 · 快速开发css3动画 · 采用less mixins写法,不会生成冗余css · 已加入主流浏览器前缀,保证最大兼容性 · LESS-Animation 部分mixins支持传参 ...
- unity3d脚本编程
一 创建和使用脚本 1 概述 GameObject的行为都是被附加到其上面的组件控制,脚本本质上也是一个组件. 在unity中创建一个脚本,默认内容例如以下: using UnityEngine; u ...
- BackTrack5 (BT5)无线password破解教程之WPA/WPA2-PSK型无线password破解
昨天公布了BackTrack5 (BT5)无线weppassword破解教程之minidwep-gtk破解法一文,对BT5下破解wep无线password的简单方法做了介绍,今天奶牛为朋友们介绍下怎样 ...
- 深入理解JavaScript 模块模式
http://www.adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html 模块模式是JavaScript一种常用的编码模式.这是一般的 ...
- [CoffeeScript] Level 4 Arrays, Objects, Iterations -- Ex
Coffee on the Range Create an array with numbers 1 until 10 using the inclusive (two dot) range synt ...
- java追加文件的几种方式
import java.io.BufferedWriter; import java.io.FileOutputStream; import java.io.FileWriter; import ja ...
- 理解Linux系统中的load average(图文版)转
一.什么是load average? linux系统中的Load对当前CPU工作量的度量 (WikiPedia: the system load is a measure of the amount ...
- 除去字符串中不相临的重复的字符 aabcad 得 aabcd
假设有一个字符串aabcad,请编写一段程序,去掉字符串中不相邻的重复字符.即上述字串处理之后结果是为:aabcd; 分析,重点考查 char 与int 的隐式转换.程序如下: static void ...
- Java最重要的21个技术点和知识点
(五)Java最重要的21个技术点和知识点之网络编程.泛型.编程规范相关 写这篇文章的目的是想总结一下自己这么多年JAVA培训的一些心得体会,主要是和一些java基础知识点相关的,所以也希望能分享给刚 ...