Fundebug微信小程序BUG监控插件更新至
1.1.0,
新增
fundebug.test()
和
fundebug.notifyHttpError()
方法,同时大小压缩至
15K
。
Fundebug
是专业的小程序BUG监控服务,可以第一时间为您捕获生存环境中小程序的异常、错误或者BUG,及时给开发者发送报警,帮助您快速修复BUG。
欢迎大家免费试用,也欢迎各位用户反馈建议或者问题。
test(name, message)
使用 fundebug.test()方法可以用于测试 Fundebug 插件。
name
: 错误名称,参数类型为字符串,默认值为”Test”
message
: 错误信息,参数类型为字符串,默认值为”Hello, Fundebug!”
示例 1 :
没有参数
示例 2 :
带参数
fundebug.test("Hello", "This is a Test");
|
fundebug.test() 主要用于测试,它发送的错误每次都会报警邮件(每天的限额是 20 封),这样可能会给您造成困扰。
为了避免重复报警,请使用其他 API 记录错误,这样同一个错误将只会在错误数达到阈值(10, 100, 100…)的时候报警。
-
notify
-
notifyError
-
notifyHttpError
notifyHttpError(req, res, option)
使用 notifyHttpError,可以将 HTTP 请求错误发送到 Fundebug。
req
: HTTP 请求参数,参数类型为 Object,其子属性与
wx.request
的请求参数一致,如下:
-
method
-
url
-
data
-
header
-
dataType
-
responseType
res
: HTTP 返回参数,参数类型为 Object,其子属性与
wx.request
的返回参数一致,如下:
-
statusCode
-
errMsg
-
data
-
header
option
: 可选对象,参数类型为 Object,用于发送一些额外信息,比如: