Balázs Édes
Balázs Édes

Reputation: 13807

Debugging Corona SDK application on device

I am working with Corona SDK for some time, and i really like it, but there is one thing, that i cant figure out: How to debug my code on a real device?

At the point, when my code runs great in the simulator, i usually compile it, and try it on the phone. But when there is some error, that doesn't bother the simulator, but pisses the phone off, i simply see an error message:

"This application encountered a Lua error (see logs) etc."

Me and my boss spent a whole day figuring out, that i made a require with a capital instead of lower case.

My question is: How to actually "see" that log? I tried to connect my device to DDMS, but i saw no relevant output. Is there a way to access that log (I'm testing on an android device)? Or is there a way to simulate the EXACT behavior of the phone in the simulator? Usually the phone freaks out because of i/o operations, and when using the wrong case.

Upvotes: 1

Views: 3095

Answers (2)

John Paul Manoza
John Paul Manoza

Reputation: 1735

If you don't have Xcode, you can try iPhone configuration utility. It is more light-weight than the xcode plus you can also use it on a windows machine.

Upvotes: 1

Rob Miracle
Rob Miracle

Reputation: 3063

The best way to debug on iOS devices is to use XCode's Organizer with your device plugged in via the USB port. On the left hand panel of Organizer, there will be a block for each device that XCode knows about. You may have to click on a button "Use device for debugging" or something similar so XCode can gather all the information it needs.

Once done, then you can use XCode to install the app to the device (you don't need to make an .ipa file, just copy the app to the device via Organizer). In that panel on the left, there is a link for "Console Log", click that and you can your print statements and other errors issued by Corona SDK.

Rob

Upvotes: 7

Related Questions