2

I am trying to leverage my very modest Ruby experience with Ruboto. I have installed the necessary packages, and the various demos work well on the simulator (on Windows) and on my Android device. I have been able to write some very simple Ruby scripts for Ruboto, but when they don't work, I have no visibility over what is happening. The only error message I get is: "Unfortunately, xyz has stopped."

I assume there must be a way to troubleshoot a Ruboto script and get a log or some kind of detailed information on the reaction of the system to each line of code.
I have been googling that question for a while without success, and I apologize if I missed something obvious. I also tried "adb catlog" without getting any useful information related to the Ruby script, but maybe I was not able to find the right information in the thousands of line generated by this command.

I hope someone can point me in the right direction. Thanks

jen
  • 300
  • 1
  • 3
  • 11

2 Answers2

2

At the moment, the debugging options for Ruboto are limited and low-tech.

You can analyse the log using "adb logcat" or the newer "rake log". "rake log" uses "adb logcat" but applies a filter so you get much less noise. If your app crashes, you should see a Ruby stack trace with the immediate cause of the crash. This is probably what most Ruboto developers use now.

Another option is to encapsulate a risky method with a "rescue" that either logs a better message, or displays the error in a dialog. This would probably be more helpful, but requires a bit more work. You could request this as a Ruboto feature in the Ruboto issue tracker :)

donV
  • 1,091
  • 7
  • 15
  • 1
    Thanks. I am starting to play with "rake log". I know this is a different ballgame, but I wish I could get the same kind of line by line error reporting Ruby offers. – jen May 27 '14 at 12:20
0

Would something like "debugger" work here? It would be awesome if it could...

Mayank Jain
  • 2,995
  • 2
  • 23
  • 19