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的更多相关文章

  1. JavaScript调试技巧之console.log()详解

    JavaScript调试技巧之console.log()详解 对于JavaScript程序的调试,相比于alert(),使用console.log()是一种更好的方式,原因在于:alert()函数会阻 ...

  2. JavaScript调试技巧之console.log()详解--2015-08-07

    对于JavaScript程序的调试,相比于alert(),使用console.log()是一种更好的方式,原因在于:alert()函数会阻断 JavaScript程序的执行,从而造成副作用:而cons ...

  3. JavaScript调试技巧之console.log()

    与alert()函数类似,console.log()也可以接受变量并将其与别的字符串进行拼接: 代码如下: //Use variable var name = "Bob"; con ...

  4. 推荐几个不错的console调试技巧

    在我们的日常前端开发中,使用最频繁的莫过于使用console.log在浏览器的控制台中打印出我们需要调试的信息,但是大部分人可能跟之前的我一样,没有意识到其实console除了log方法以外,还有很多 ...

  5. 前台console调试技巧

    前台console调试技巧 一.console.log() 二.console.warn() 三.console.dir() 四.console.table() 五.console.assert() ...

  6. Firebug Console API

    原文发布时间为:2011-06-06 -- 来源于本人的百度文章 [由搬家工具导入] Console API 当打开 firebug (也包括 Chrome 等浏览器的自带调试工具),window 下 ...

  7. Console API 与命令行

    一.Console API 当打开 firebug (也包括 Chrome 等浏览器的自带调试工具),window 下面会注册一个叫做 console 的对象,它提供多种方法向控制台输出信息,供开发人 ...

  8. Google调试技巧总结

    工欲善其事 工欲善其事,必先利器. Google调试面板一一介绍:F12回想一下大家都应该知道,哈哈 element面板 这个面板显示了页面所有html代码.用于调试css代码.右側展示左側相应选择元 ...

  9. 前端开发中的JS调试技巧

    前言:调试技巧,在任何一项技术研发中都可谓是必不可少的技能.掌握各种调试技巧,必定能在工作中起到事半功倍的效果.譬如,快速定位问题.降低故障概率.帮助分析逻辑错误等等.而在互联网前端开发越来越重要的今 ...

随机推荐

  1. Java Web系统经常使用的第三方接口

    1. Web Service 接口 1.1 接口方式说明和长处 在笔者的开发生涯中,当作为接口提供商给第三方提供接口时,以及作为client去调用第三方提供的接口时,大部分时候都是使用 Web  Se ...

  2. 【React Native 实战】二维码扫描

    1.前言今天介绍React Native来实现二维码扫描的功能.首先我们要借助第三方插件react-native-barcode-scanner-universal来实现跨平台二维码扫描. 2.介绍 ...

  3. Java 完美判断中文字符的方法

    Java判断一个字符串是否有中文一般情况是利用Unicode编码(CJK统一汉字的编码区间:0x4e00–0x9fbb)的正则来做判断,但是其实这个区间来判断中文不是非常精确,因为有些中文的标点符号比 ...

  4. iOS 开发——实用技术Swift篇&Swift 懒加载(lazy)

    Swift 懒加载(lazy) 在程序设计中,我们经常会使用 * 懒加载 * ,顾名思义,就是用到的时候再开辟空间,比如iOS开发中的最常用控件UITableView,实现数据源方法的时候,通常我们都 ...

  5. js本地图片预览代码兼容所有浏览器

    html代码 <div id="divPreview" style="width: 160px; height: 170px"><img id ...

  6. 基于sqlite的Qt 数据库封装

    [代码] mydata.h 10 #ifndef MYDATA_H 11 #define MYDATA_H 12 #include <QObject> 13 #include <QS ...

  7. yii2-admin 插件使用简要教程

    yii2的访问权限默认是由自带的rbac组件在管理,需要自己编写相应的规则去实现权限管理,无图形界面.yii2-admin是将rbac的管理可视化,只需要点几下鼠标就能设置好简单的规则. 本教程中软件 ...

  8. Socket 之 API函数介绍

    1.创建套接字──socket() 应用程序在使用套接字前,首先必须拥有一个套接字,系统调用socket()向应用程序提供创建套接字的手段,其调用格式如下: SOCKET PASCAL FAR soc ...

  9. MyBatis优化技巧

    ☬配置日志文件 封装工具类 代码贴一下: package com.shxt.utils; import java.io.InputStream; import org.apache.ibatis.io ...

  10. 通过maven添加quartz

    pom.xml中相关dependency信息 ? 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 <depen ...