Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to attach new Android Profiler to debug app process directly after build?

Attaching Android Studio 3.0 Android Profiler to debug app from cold start is almost impossible, because I'd have to select process from dropdown (and start record) in very short timespan.

For profiling app cold start, is there a more convenient way?

Selecting "debug app" in android Developer Settings does not help unfortunately.

like image 765
poss Avatar asked Oct 04 '17 12:10

poss


People also ask

How do I profile an app on Android?

To open the Profiler window, choose View > Tool Windows > Profiler or click Profile in the toolbar. If prompted by the Select Deployment Target dialog, select the device on which to profile your app. If you've connected a device over USB but don't see it listed, ensure that you have enabled USB debugging.

Which tools are used for debugging on the Android platform?

Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.


1 Answers

With Android Studio 3.2 Canary 11, you can profile your app from startup.

Just go to Run -> Edit Configurations -> Profiling Tab and check "Start recording a method trace on startup".

Here's a link to download it. https://developer.android.com/studio/archive.html

like image 187
shaishgandhi Avatar answered Sep 27 '22 22:09

shaishgandhi