Android Debug

Android Debug

There are several ways to debugyour android app.

Traceview

1.      Insert the code to the part you want to debug.

 Debug.startMethodTracing(“calc”);//calc  is the name of the debug file.

                /***********debugcode here****************/

Debug.stopMethodTracing();

2.      Run your apps.

3.      Run command:

Adb ls /sdcard/

You can see calc.trace file

4.      Cope the file to your local file.

Adb pull /sdcard/calc.trace./

5.      Run command:

Traceview calc.trace

 

 

You can also see the picture of the calling relationship:

Sudo apt-get install graphviz

 

Run command:

Dmtracedump –g aa.png calc.trace

 

That’sall!!

               

 

                

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章