开发者

How can we print the contents of GDB or log statements on the device(iPad)

This question might be a bit strange and i apologize for that... i have rather a strange problem with my iPad app. My app is running absolutely fine when i connect the device to my system and run the app. But,it is getting crashed repeatedly once i try to use the app after disconnecting it from my system. This is very strange to me. I am unable to even debug this because of this strange issue. i need at least GDB log to debug my c开发者_开发问答ode.So, is there any way in which i can print my GDB log on my device(iPad)... At least is there any other way in which i can solve this strange issue...


Is it crashing while you are debugging and then disconnect the device. If you disconnect your device while debugging, the app will stop on your device and you need to reopen it to continue using it on the device.

If you want the Logs stored on your device, connect your device to your Mac and in Xcode go to Window -> Organiser. Select the Devices Tab and on the left should be your Device and an option to view the Device Logs which should get you the same Crash Logs you get in the Debugger Output window. Xcode will Symbolise them if it can so you should be able to debug the issue. It will also show Crash Logs for Applications you do not develop but those will not be Symbolised so won't make much sense.

Alternatively, if you choose the Console option you'll be able to see the Console output which will show all your NSLog outputs. It will also have some Device Specific output which you can ignore.

How can we print the contents of GDB or log statements on the device(iPad)


Use NSLog(), you can read the resulting console entries in the Xcode organiser after connecting the device via USB:

How can we print the contents of GDB or log statements on the device(iPad)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜