Debug from Device

How can I get debug info from the device when the app is running on the device?

I saw something about being able to set up debugging with xcode but couldn’t get anything to work.

Thanks! [import]uid: 11632 topic_id: 4746 reply_id: 304746[/import]

Are you still stuck with this? [import]uid: 8353 topic_id: 4746 reply_id: 15336[/import]

If you put the following code at the top of your main.lua file you should get all print() output sent to the XCode console:

io.output():setvbuf('no')

[import]uid: 5833 topic_id: 4746 reply_id: 15510[/import]

Hey Graham!

Where is the xcode console? [import]uid: 11632 topic_id: 4746 reply_id: 15783[/import]

With your app/game running on your device and the device connected load up the XCode Organiser window and it should be in one of the tabs for your device. [import]uid: 5833 topic_id: 4746 reply_id: 15789[/import]

Ah there it is thanks Graham.

It’s not showing any debug text like the terminal does though? Any idea why? [import]uid: 11632 topic_id: 4746 reply_id: 15790[/import]

I can’t say I really like xCode, so I use the iPhone Configuration Utility ( http://support.apple.com/kb/dl851 ). It makes installing/uninstalling apps and provisioning profiles very fast and easy, and it also has a console output that prints your debug info while the device is connected. I’d recommend giving it a shot!

a. [import]uid: 12405 topic_id: 4746 reply_id: 15850[/import]

Hey Adam, That console works! Thanks for the help!

@Graham, I’m not sure why the console isn’t working from xcode :S [import]uid: 11632 topic_id: 4746 reply_id: 15863[/import]