I am investigating some issues which happen during my app's startup process, but DDMS won't start the debug mode until the process has started, is there a way I can capture the events earlier?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
For Android Studio, here is what worked for me:
Where you want to start debugging.
Once it's up, attach the debugger:
Start debugging
You should implement your own Application class which extends Application and override the methods onCreate and so.. . This class will be your starting point of your app.
also set it as your application in the manifest.
I know that this is a couple of years late, but for any future searches:
Putting
WaitForDebugger
into your code is one way.Unlocking developer options (by tapping on the build number in system information on the android device) in Settings allows us to select an application for debugging and then opt to wait for a debugger whenever the program is launched. This allows us do the equivalent of adding and removing
WaitForDebugger
without modifying and reinstalling the code each time.