欧美日韩国产一区,亚洲一区视频,色综合久久久久,私密按摩师舌头伸进去了,99re6这里只有精品,夜夜性日日交xxx性hd

Fundebug微信小程序用戶行為添加HTTP請求和console打印

  • • 發表于 7年前
  • • 作者 Fundebug
  • • 3276 人瀏覽
  • • 1 條評論
  • • 最后編輯時間 7年前
  • • 來自 [技 術]

原創聲明:本文為作者原創,未經允許不得轉載,經授權轉載需注明作者和出處

摘要:

![](upload/topic/week_26/420fccd8-7f3e-499e-a01e-a4a7421c6fff.png)

接入插件

接入Fundebug的小程序錯誤監控插件非常簡單,只需要下載0.6.1,在app.js中引入并配置apikey:

var fundebug = require('./libs/fundebug.0.6.1.min.js')
fundebug.init({
  apikey: "API-KEY"
});

獲取apikey需要免費注冊帳號并且創建項目。創建項目時語言請選擇“微信小程序”。

另外,還需要將https://fundebug.net添加到request合法域名。

用戶行為

目前,Fundebug一共監控3種小程序用戶行為:

  • 函數調用
  • HTTP請求
  • console打印

如下圖所示:

通過分析出錯之前的用戶行為,開發者闊以快速復現出錯場景,并找到出錯原因,從而解決錯誤。

monitorHttpData:獲取HTTP請求的data

出于保護隱私,Fundebug在監控HTTP請求時,不會收集請求的body(即wx.request的data參數)。

如何你希望收集HTTP請求錯誤的body的話,請將monitorHttpData屬性設為true。

fundebug.init({
  monitorHttpData: true
});

這樣,用戶行為HTTP請求將包含請求的body,方便開發者分析BUG。

silentHttp:禁用HTTP請求監控

如果你不希望監控HTTP請求的話,可以將silentHttp屬性設為true:

fundebug.init({
  silentHttp: true
});

這樣,用戶行為中將不會包含HTTP請求

silentInject:禁止重寫App/Page和wx變量

當使用小程序插件(例如微信同聲傳譯)時,重寫App/Page/wx等全局變量被微信禁止(調試基礎庫2.0.9及以上版本):

[non-writable] write wx is not allowed when using plugins at app.json.
[non-writable] write App is not allowed when using plugins at app.json.
[non-writable] write Page is not allowed when using plugins at app.json.

這時,需要將silentInject設為true。

fundebug.init(
{
    silentInject : true
})

并使用notifyError上報onError捕獲的錯誤:

App(
{
    onError: function(err)
    {
        fundebug.notifyError(err);
    }
})

禁止重寫App/Page和wx變量之后,用戶行為中將不再有函數調用以及HTTP請求

分享到:
1條評論
Ctrl+Enter
作者

Fundebug

Fundebug

APP:0 帖子:11 回復:14 積分:186

已加入社區[3031]天

fundebug.com小程序bug監控

作者詳情》
Top