Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I do remote debugging in Xcode 4?

Is there a way to do remote debugging in Xcode 4? The previous answers to this question were for Xcode 3 and Apple removed the specific debugging in Xcode guide that (I assume) covered remote debugging.

For kicks I've been doing this with lldb, but if there's a way with gdb that'd be great. So far, I've been able to start a debug server on the remote machine like so

/usr/bin/ssh -l ${REMOTE_USER} -f ${REMOTE_HOST} "/Developer/usr/bin/debugserver localhost:12345"

And I can then manually log in with lldb from the Terminal and debug away. What I'd like to be able to do is at the very least start a bare lldb session within Xcode and then manually to process connect connect://hostname:port.

like image 710
paxswill Avatar asked Jul 14 '11 14:07

paxswill


People also ask

How do I start debugging in Xcode?

When you run an application in Xcode, the debugger is automatically started and attached to the process of the application. Click the Run button in the top left or press Command + R. From the moment the application is up and running, we can start inspecting the process and, if necessary, debug it.

How do I run remote debugging?

Set up the debugger First, we need to set up the run/debug configuration that will be used for attaching to the host application. From the main menu, select Run | Edit Configurations or press Alt+Shift+F10 then 0 . and select Remote JVM Debug.


1 Answers

Xcode 4 doesn't currently support remote Mac debugging. Even if you were able to hack Xcode to talk to a remote debugserver, there's no guarantee that interaction with it would be fully or properly handled by the IDE or the remote debugserver.

like image 107
Chris Hanson Avatar answered Sep 19 '22 21:09

Chris Hanson