33

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.

2
  • 1
    Even with your workaround I still can't set breakpoints (lldb never resolves the symbols). Apple's documentation says to use gdbserver on the remote host but I can't seem to find it anywhere in the developer tools. Can't compile it from GDB's actual source either, though haven't tried very hard (yet). Time to file a bug report I think!
    – arrtchiu
    Aug 13, 2011 at 2:18
  • Yep, my bug (rdar://9774922) was marked as a dupe of rdar://9774922. Hopefully they'll resolve it soon, so keep filing them. On your problem (lldb not resolving symbols), you might need to have the corresponding symbols on your local machine. In my case I was developing locally, and testing a Preference Pane on a remote machine. I would git push and build locally, and git pull and build remotely.
    – paxswill
    Aug 14, 2011 at 4:08

1 Answer 1

12
+500

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.

1
  • 4
    I understand you probably can't comment, but has it at least been thought about bringing back?
    – paxswill
    Dec 28, 2011 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.