File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,10 @@ MethodTraceServerManager.INSTANCE.startService(context);
140140<img src =" img/result.png " width:600 height:350 />
141141
142142
143+ ## 问题排障
144+
145+ 日志排障详见:<a href =" 问题排障.md " >问题排障</a >
146+
143147** 注意事项:**
144148* 请不要同时打开两个集成了此项目的App,会导致耗时数据无法传送到浏览器的UI界面
145149* 请不要同时连接两个手机,会导致浏览器打开界面失败
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ buildscript {
3333 maven { url "https://plugins.gradle.org/m2/" }
3434 }
3535 dependencies {
36- classpath "gradle.plugin.cn.cxzheng.methodTracePlugin:tracemanplugin:1.0.1 "
36+ classpath "gradle.plugin.cn.cxzheng.methodTracePlugin:tracemanplugin:1.0.3 "
3737 }
3838}
3939
@@ -51,7 +51,7 @@ allprojects {
5151
5252``` groovy
5353dependencies {
54- debugImplementation 'com.github.zhengcx:MethodTraceMan:1.0.4 '
54+ debugImplementation 'com.github.zhengcx:MethodTraceMan:1.0.6 '
5555 releaseImplementation 'com.github.zhengcx:MethodTraceMan:1.0.5-noop'
5656}
5757
Original file line number Diff line number Diff line change 11# MethodTraceMan问题排障
2- 当集成完MethodTraceMan项目后,Rebuild项目并启动app后,遇到没有成功输出方法耗时数据时,第一步请先阅读以下的几个注意事项,看是否有存在问题:
2+ 当集成完MethodTraceMan项目后,Rebuild项目并启动app后,遇到没有成功输出方法耗时数据时,` 第一步请先阅读以下的几个注意事项 ` ,看是否有存在问题:
33* 请不要同时打开两个集成了此项目的App,会导致耗时数据无法传送到浏览器的UI界面
44* 请不要同时连接两个手机,会导致浏览器打开界面失败
55* 集成进自己的项目的话,请务必记得将traceconfig.txt中 -tracepackage配置成自己想插桩的包范围
66* 如果重启AndroidStduio后在顶部栏没发现小灯泡图标,请检查AndroidStduio顶部栏View->Toolbar是否勾选上
77
88
9- 当上面的注意事项都排查过没有问题,依然无法成功输出数据时,则需要启动项目内部的日志来排查问题了 ,整个项目主要包括:插桩、数据处理、发送数据、接收数据、展示数据等几个过程,所以我们在这几个重要过程都添加了详细的日志,遇到问题可以首先通过以下几个配置来打开详细的日志输出:
9+ 当上面的注意事项都排查过没有问题,依然无法成功输出数据时,则需要 ` 启动项目内部的日志来排查问题 ` 了 ,整个项目主要包括:插桩、数据处理、发送数据、接收数据、展示数据等几个过程,所以我们在这几个重要过程都添加了详细的日志,遇到问题可以首先通过以下几个配置来打开详细的日志输出:
1010
1111## 打开详细日志输出配置
1212
13- 1.build.gradle中打开logTraceInfo开关 ,则会在Rebuild过程中输出所有被插桩的类和方法
13+ 1.build.gradle中打开 ` logTraceInfo ` 开关 ,则会在Rebuild过程中输出所有被插桩的类和方法
1414
1515``` groovy
1616apply plugin: "cn.cxzheng.asmtraceman"
@@ -31,11 +31,11 @@ MethodTraceServerManager.logLevel = MethodTraceServerManager.MTM_LOG_DETAIL
3131## 排障
3232
33331.首先通过观察Build下的编译日志来看看是否插桩成功(会输出所有被成功插桩的类和方法)
34-
34+ < img src = " img/mtm-logprint.png " width:600 height:350 />
3535
3636
37372.在Logcat下筛选关键字` MethodTraceMan ` ,观察各个流程的详细日志输出,看看哪个流程有问题,最后结束耗时统计的时候是否发送了耗时数据给浏览器等
38-
38+ < img src = " img/log_detail.png " width:600 height:350 />
3939
4040
41413.如果通过第二步的排查确定已经将数据正确的发送给了浏览器,那么最后一步就是排查浏览器是否正确的接收到了,打开浏览器的检查->Console查看输出即可。
You can’t perform that action at this time.
0 commit comments