简体   繁体   中英

How to debug a published native app (C++)?

I need to publish an app that is made with QT/C++ in Google Play. While developing and testing beta in Google Play, I used a debug version and lots of logs to spot bugs. I either connected to the testers' devices via adb or asked them to send me a log that was stored in system "Download" directory. I am worried about several issues if my app is published:

  1. I feel like a release version must be published. Will I get core dump for a native app in google play console for release version? If I do, I am afraid it will be useless without debug information.
  2. Is publishing debug version a bad idea? Is there any obfuscation support for native code or binaries? If so, will it help me to still get core dump and/or debug logs while preventing the app from being reverse engineered?
  3. I am thinking about logging to a file and catching SIGSEGV, sending a log file to our server using http POST request. What drawbacks/issues do you see with this solution?
  4. What are other technics would you advise to use that will help to track down and fix issues in a published app?

You can use other techniques or features like firebase or fabric for crash reporting and other things no need to send logs, Whenever any crash occur they will provide logs also

For better performance disable all logs in production build

Solution: 1 : Yes you can do this by changing all debug logs to error logs (Log.d() -> Log.e() ). because debug logs are not visible in Release build but you can see error logs in any variant. Hope it will help.

Solution 2: You can use Fabric and see all your logs to Fabric account . This can be done by using its Answer module .

Note : I have used both scenarios in live projects and they are working fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM