0

If this is a repeated question, please forgive me!

I don't know how to debug directly to the iPhone 4 device using Xcode of my project. Please share and help me on providing the steps or official tutorial link to do this.

Thanks.

Getsy
  • 4,887
  • 16
  • 78
  • 139

2 Answers2

0

Please register as a iPhone Developer in Apple, so that you will get all the necessary things to develop the app.

jonsca
  • 10,218
  • 26
  • 54
  • 62
user857280
  • 25
  • 1
  • 5
  • That's why i asked i don't see any such links from Apple apart from http://developer.apple.com/library/mac/#documentation/IDEs/Conceptual/Xcode4TransitionGuide/Debugging/Debugging.html. If you have please share it, would be very much helpful to me. – Getsy Jul 27 '11 at 10:01
0

If you are registered developer then once you have downloaded the provisioning profiles onto the target, you can select the target from the dropdown menu to launch your application. After its launched you can set breakpoints, debug, view debug logs etc in the exact same way as you would do on the simulator. Theres nothing different to it.

Only step would be to deploy it on target.

If you havent got the provisioning profile, then follow apple's guidelines on their site.

Praveen S
  • 10,355
  • 2
  • 43
  • 69
  • Hi, I got the provisioning profile and added into Xcode as well. Debugging with Simulator is fine. But debugging on the device, i set the provisioning profile at Code signing Identity in Build settings tab and then choose debug in Edit Scheme. It is not stopping at break points and simply like installing the app directly to the device, that's all. Have you tried debugging using Xcode 4? – Getsy Jul 27 '11 at 12:01
  • Yes i do it all the time. Have you clicked the break points button? – Praveen S Jul 27 '11 at 12:17
  • Hi, I'm not getting it. Clicking break point button? Could you please tell me where it is in Xcode 4? There is an option called "Breakpoints" in the top left near to "Run", "Stop" and "Scheme" options, which is always enabled(Clicked state) to me. Do you use Xcode 4 or 4.0.2 or something like that? Do you use Debugger as "GDB" or anything else? – Getsy Jul 27 '11 at 12:21
  • I use it as gdb only. And you are right about the breakpoints button too. Let me see if i can edit my answer for a clear explanation. – Praveen S Jul 27 '11 at 13:00
  • What the setting for strip debug symbols? Is your device always connected. And you need to run the app from xcode and not just launch it from the device. – Praveen S Jul 27 '11 at 13:01
  • I'm not able even run(in release mode itself) the app directly from xcode to device because xcode is showing error as "Error starting executable 'my-TestApp' error launching remote program: failed to get task for process" like that. But, it puts the app on the device. Then i manually launch the app on iPhone. What may be wrong here, please advise. – Getsy Jul 27 '11 at 13:06
  • No delete the app from device and try running. Looks like you havent killed your prev instance of app. Delete the app completely. Connect device and run the app from xcode. – Praveen S Jul 27 '11 at 13:10
  • @Getsy let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/1876/discussion-between-praveen-s-and-getsy) – Praveen S Jul 27 '11 at 13:10
  • You cannot use adhoc certificate to debug. You got to get the developer certificate. – Praveen S Jul 27 '11 at 14:09
  • It is resolved after using Developer profile and restart xcode, iPhone. Thanks a lot for help! – Getsy Jul 27 '11 at 20:07