Fundebug前端JavaScript插件更新至1.6.0,新增test()方法用于测试

栏目: JavaScript · 发布时间: 6年前

内容简介:摘要:1.6.0 新增 fundebug.test()方法用于测试,请大家及时更新。默认情况下,Fundebug 插件能够自动捕获未处理的错误(uncaught error)。另外,开发者也可以通过使用 Fundebug 提供的 API 发送其他错误信息:

摘要:1.6.0 新增 fundebug.test()方法用于测试,请大家及时更新。

Fundebug前端JavaScript插件更新至1.6.0,新增test()方法用于测试

默认情况下,Fundebug 插件能够自动捕获未处理的错误(uncaught error)。另外,开发者也可以通过使用 Fundebug 提供的 API 发送其他错误信息:

fundebug.test(name, message)

使用 test() 方法,可以将测试数据发送到 Fundebug

name: 测试名称,参数类型为字符串,默认值为”Test”

message: 测试信息,参数类型为字符串, 默认值为”Hello, Fundebug!”

示例:

  • 不设置 name 与 message
if ("fundebug" in window) {
    fundebug.test();
}
  • 设置 name 与 message
if ("fundebug" in window) {
    fundebug.test("Test", "Hello, Fundebug!");
}

报警规则

test()方法用于测试,它发送的数据每次都会发送报警,每天报警次数限额为 20 次。

为了避免重复报警,请使用notifyError()或者notify()记录错误,按照默认的报警规则,同一个错误将只会在错误数达到阈值(10, 100, 100…)的时候报警。


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

About Face 3

About Face 3

Alan Cooper、Robert Reimann、David Cronin / John Wiley & Sons / 2007-5-15 / GBP 28.99

* The return of the authoritative bestseller includes all new content relevant to the popularization of how About Face maintains its relevance to new Web technologies such as AJAX and mobile platforms......一起来看看 《About Face 3》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具