1.1.5 • Published 2 years ago
rn-debug-tool v1.1.5
一款react native debug 测试工具
功能点
- 支持APP显示Http请求日志
- 支持App连接服务器环境切换 方便测试人员对bug进行定位,开发不再是对bug进行黑盒测试。
安装
npm install rn-debug-tool --save
or yarn add rn-debug-tool
用法
初始化工具: DebugManager.openTool()
Http请求日志功能:支持在使用axios库时,将得到的response响应数据传入DebugManager中的LogManager类里的appendHttpLogs方法 DebugManager.LogManager.appendHttpLogs(response) //添加响应请求到debug管理类
初始化服务器线路切换功能:DebugManager.ServerUrlManager.initServerUrlMap(urlList); // 初始化线路数据 urlList是数组例如
``` const urlList = [
{title: '线路1', host: '域名1'},
{title: '线路2', host: '域名2'},
] ```
切换设置域名: DebugManager.ServerUrlManager.setHost(host);