Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to monitor threads in AndroidStudio?

I have an Android Java app that I am creating in AndroidStudio and running it on a Samsung Tablet (not using a virtual device at all). I have three threads and I believe that one of them may be getting stuck in some sort of loop because the app severely slows down at some point, but not forever.

Are there some tools available where I can monitor my app and all threads as far as CPU, RAM, etc. usage?

Thanks

like image 903
Daniel K Avatar asked Aug 19 '16 04:08

Daniel K


1 Answers

For Android 3.6.3

  1. click Run > Debug 'app' (or shift + F9)
  2. In the window that popped up click on the top right corner to enable more tabs
  3. Make sure that Threads tab is enabled: See that Threads tab is enabled
  4. click on the bottom of the screen on Debug and click on the Debugger tab
  5. click on the Threads tab and you will see the threads

Another option:

  1. click Run > Profiler 'app'
  2. Expand window to fit full screen
  3. click on the CPU area: Click on the area where it shows CPU activity
  4. click on to expand Threads: Click on threads to expand them
like image 99
Trake Vital Avatar answered Nov 10 '22 22:11

Trake Vital