On-Device Debugging via USB

I think this has been mentioned in other threads but couldn’t find one in the feature request forum so thought I’d post it here. Specifically, we really need on-device debugging via USB for Corona.

The command line debugger is functional but doesn’t provide source level debugging and only works on the Corona simulator. For those who have ever done native Android development you’ll understand that not all devices behave the same and the only way to really test is on the device. Even on iOS this would be helpful to solve any strange crashes that don’t happen on the simulator because of memory or timing issues.

I’ve been following the developments of Adobe Flex for mobile and this video shows exactly what I’d love to see:
http://tv.adobe.com/watch/adc-presents/mobile-device-debugging-using-usb

If anyone else thinks this would help your development process with Corona please show your support by posting here. [import]uid: 8692 topic_id: 9976 reply_id: 309976[/import]

Yes.

I need this function too.

Debugging on device is painful, especially for those functions simulator was’t support (e.g. facebook)

Bob [import]uid: 20999 topic_id: 9976 reply_id: 36380[/import]

What about the Console in XCode? [import]uid: 21712 topic_id: 9976 reply_id: 36382[/import]

TheOddLinguist, the console is just a place to get debug output. Print statements is not what I mean, that’s kind of a last resort method in my opinion. If you want to see what’s going on in your code on the device you should be able to open your source code and set a breakpoint and step through line by line and see what the values are. Watch that video for an example of what I mean. [import]uid: 8692 topic_id: 9976 reply_id: 36385[/import]

Hmm, fair enough. Then, I suppose the request would be for a full debugging suite first. hehe

Besides, I don’t know what compiling magic goes on when you build on Ansca’s servers, but I wonder if it even could include debugger hooks to the source.

Sounds good to me, though…would certainly eliminate some steps in development. [import]uid: 21712 topic_id: 9976 reply_id: 36387[/import]

Well a full Corona IDE suite would be great but really just adding the capability in the form of an API or some sort of hooks would allow others to do it. There are quite a few IDE’s popping up around Corona now, I’m using IntelliJ with the Lua/Corona plugin and it’s working great as a code editor.

In terms of the work involved I can’t say, I’ll leave that to the Ansca team since they’re the experts here. What I do see from a developer’s perspective is Adobe is making some moves in mobile with Flash Builder 4.5 and Creative Suite 5.5. For making apps it’s pretty compelling, I’d kill to use the Flex controls for input right about now for example. Really this is just a plea to Ansca to work on these hard problems and give us modern integrated development tools to leverage their great Corona platform.
[import]uid: 8692 topic_id: 9976 reply_id: 36401[/import]

although this isnt exactly what your asking for ddms is very helpfull in tracking down bugs on android.

What I do…

  1. install the apk on the android device i want to “debug” on
  2. connect device to computer via usb cable
  3. launch ddms (ddms is free and is part of the android sdk)
  4. launch the app and start using it. ddms provides a log containing errors warnings and other events. you can even filter it out so that it only shows errors if that’s what your interested in.

[import]uid: 27671 topic_id: 9976 reply_id: 36447[/import]

logcat is also good -

c. [import]uid: 24 topic_id: 9976 reply_id: 36484[/import]

Yes, DDMS and logcat are great for printing traces. I don’t want to sidetrack the thread with regards to the request as these are two very different things in my mind. Don’t get me wrong, I read about people programming with punch cards back in the day, but it’s 2011 and we need on-device source level debugging not just a way to print stuff and debug via trial and error. :slight_smile:
[import]uid: 8692 topic_id: 9976 reply_id: 36486[/import]

Any updates on this?

Carlos???

I could really do with source level debugging on devices! [import]uid: 64174 topic_id: 9976 reply_id: 56764[/import]