1
votes

I am using Titanium Studio. I build an application, I can debug the application in Android Emulator properly, but in device, it crashes. How can I debug the application in android Device? If any idea then suggest me..! Thanks in advance.

3
Is it possible that you could log the game states to find out when it crash etc. with simle Log.v() calls? - Ruuhkis
But, how i call Log.v() plz explain it ..? - MRT
Have you checked for crash report on logcat? You may not have to do the logging yourself if you have crash report. - Ruuhkis
sometime it crash report is :- your application is closed unexpected error ... - MRT
So the report continues? We need the whole report to help you out - Ruuhkis

3 Answers

4
votes

With the latest version of Titanium available as a developer preview at the moment, you can debug on the device not just view the console logs. You can download it from here:

Titanium Studio 3.0 (Beta)

2
votes

When connecting the device to a computer, check to see if the device is recognized by adb by entering the command adb devices into the terminal or cmd prompt. If an I number is shown than your device is connected. Then you can enter the command adb logcat which will show you the entire log of the device.

0
votes

One drawback I've found with using Titanium Studio 3's debug mode is that if the Android app crashes, I have to recompile and reinstall my app to restart Titanium's debug server. It's still useful for setting breakpoints in my code and stepping through it.

So my current debug workflow involves a combination of

  • in Ti Studio 3, install app in debug mode, use breakpoints and expressions
  • in my OSX/Linux command line, using adb -d logcat | grep -G '\(TiAPI\)\|\(TiApp\)' to view console logging for only the Titanium App
    • multiple instances of adb -d logcat can run at the same time, so I'm experimenting with keeping multiple running with different filters

Adb alone is useful when I'm getting closer to a bug and might just need to reproduce it a few more times. The 1 minute recompile/reinstall time is painful in these situations