有没有一种方法可以在构建后直接附加新的Android Profiler来调试应用程序进程?

问题描述:

几乎没有可能安装Android Studio 3.0 Android Profiler来从冷启动中调试应用程序,因为我必须在很短的时间内从下拉列表中选择进程(并开始记录).

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?

不幸的是,在android开发人员设置中选择调试应用"无济于事.

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

使用Android Studio 3.2 Canary 11,您可以在启动时配置您的应用程序.

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".

这里是下载链接. https://developer.android.com/studio/archive.html