How do I improve quality of debug data when my app crashes in the wild?

白昼怎懂夜的黑 提交于 2020-01-03 10:54:30

问题


I had my first NullPointerExceptions in my app and it showed up on the Developer Console.

While I was starting to ask for advice here I realised what the problem was, but it brought to the front of my mind something that's been bothering me for some time - how to make it as easy as possible to debug my code when the only thing I have access to is the developer console and the stack traces present there.

In other words, is there anything I can do as a developer to improve the feedback I get when my app crashes in the wild? Maybe it's Google Analytics, maybe the Instrumentation classes, but there must be a better way to get more context to help me debug my app when I don't have access to the user or their device for debugging?


回答1:


You can also use ACRA http://code.google.com/p/acra/




回答2:


If you have some application logging turned on, then you can send those logs as well using http://code.google.com/p/android-remote-stacktrace/. This will give you invaluable context about what the user was actually doing in the period leading up to when the crash happened.



来源:https://stackoverflow.com/questions/4891603/how-do-i-improve-quality-of-debug-data-when-my-app-crashes-in-the-wild

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!