专栏名称: Fundebug
Fundebug为JavaScript、微信小程序及Node.js开发团队提供专业的线上代码bug监控和智能分析服务。
目录
相关文章推荐
前端大全  ·  从 DeepSeek 看25年前端的一个小趋势 ·  昨天  
前端早读课  ·  【招聘】字节跳动客服平台招高级前端开发工程师 ·  21 小时前  
歸藏的AI工具箱  ·  终于有给设计师用的 Cursor 了 ·  昨天  
歸藏的AI工具箱  ·  终于有给设计师用的 Cursor 了 ·  昨天  
前端早读课  ·  【第3454期】如何用语音学习编程的 ·  昨天  
前端早读课  ·  【开源】TinyEngine开启新篇章,服务 ... ·  2 天前  
51好读  ›  专栏  ›  Fundebug

Fundebug微信小程序插件更新至0.7.1

Fundebug  · 公众号  · 前端  · 2018-08-13 09:55

正文

摘要: Fundebug的微信小程序错误监控插件更新至 0.7.1 ,主要修复了2个BUG,请大家尽快更新。



修复打印cyclic object时的BUG

所谓cyclic object,指的是对象的子属性指向对象本身。

如果你使用的Fundebug微信小程序错误监控插件是 0.6.1 ,并且在代码中打印了cyclic object:

var a = {
   b: "b"
};
a.a = a;
console.log(a);

这时,微信开发者工具的console会出现 TypeError: Converting circular structure to JSON

TypeError: Converting circular structure to JSON
   at JSON.stringify (<anonymous>)
   at Object._.(anonymous function) [as sendToFundebug] (http://127.0.0.1:53468/appservice/release/fundebug.0.6.1.min.js:596:29)
   at http://127.0.0.1:53468/appservice/release/fundebug.0.6.1.min.js:1204:226
   at t.(anonymous function) (http://127.0.0.1:53468/appservice/release/fundebug.0.6.1.min.js:1210:24)
   at Function.function.u.(anonymous function) (http://127.0.0.1:53468/appservice/__dev__/WAService.js:5:26937)
   at Object.fail (http://127.0.0.1:53468/appservice/__dev__/WAService.js:5:3482)
   at s. (http://127.0.0.1:53468/appservice/__dev__/WAService.js:13:21877)
   at s.emit (http://127.0.0.1:53468/appservice/__dev__/WAService.js:7:14344)
   at Function. (http://127.0.0.1:53468/appservice/__dev__/WAService.js:13:23047)
   at http://127.0.0.1:53468/appservice/__dev__/WAService.js:6:17533

这个BUG不会影响小程序的正常使用 ,只是带有这条console记录的报错数据将无法发送到Fundebug。 0.7.0 已经修复了这个BUG,可以正常报错,且该条console打印可以记录到用户行为中(去除了cyclic属性):



修复wx.request返回undefined的BUG

由于在重写wx.request时没有return,导致wx.request返回undefined,0.7.1版本的插件已经修复了这个问题:

// 修复wx.request()返回undefined的BUG
var requireTask = wx.request(
{
   url: "http://ip.taobao.com/service/getIpInfo.php",
   method: "GET",
   data:
   {
       ip: "45.79.109.13"
   }
});
console.log(typeof requireTask); // 0.7.1会打印object

silentConsole

0.7.0 插件新增了silentConsole配置选项。

如何你不希望在用户行为中记录console打印,可以将silentConsole属性设为true:

fundebug.init(
{
   silentConsole : true
})

silentBehavior

0.7.0 插件新增了silentBehavior配置选项。

如何您不希望记录函数调用、console打印、HTTP请求等用户行为,可以将silentBehavior属性设为true:

fundebug.init(






请到「今天看啥」查看全文