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!!