minboxdebug
v1.0.5
Published
Small program error monitoring
Downloads
6
Readme
小程序bug监控工具
# 安装
$ npm install minboxdebug --save
应用场景
1、监听线上未知错误
2、记录错误执行堆栈,更方便重现错误
怎么使用minboxdebug
1、引入资源
在app.js中加入,记得放在App对象上面
#### 固定参数
import minboxdebug from 'minboxdebug'; // 引用xbossdebug
minboxdebug.config.key = 'wx74xxxxxxxxx7f' // key为自定义唯一值,用于后端记录时区分应用
minboxdebug.config.url = 'http://192.168.1.43:8087/log/save'; // 上报服务端地址
#### 可选参数
minboxdebug.setSystemInfo = true; // 获取系统信息
minboxdebug.setUserInfo = true; // 获取用户信息
minboxdebug.setLocation = true; // 获取用户位置信息
2、测试是否正常使用
App({
onLaunch: function () {
minboxdebug.notifyError('error')
}
})
3、控制台查看network,如果看到一个指向你配置url的请求,那就成功了。