如何在 Xcode 4 中进行远程调试?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6695280/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 21:29:12  来源:igfitidea点击:

How can I do remote debugging in Xcode 4?

xcodedebugginglldb

提问by Will Ross

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.

有没有办法在 Xcode 4 中进行远程调试?这个问题的先前答案是针对 Xcode 3 的,Apple 删除了 Xcode 指南中的特定调试(我假设)涵盖了远程调试。

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

对于踢球,我一直在用lldb,但如果有办法,gdb那就太好了。到目前为止,我已经能够像这样在远程机器上启动调试服务器

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

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

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

然后我可以lldb从终端手动登录并进行调试。我希望能够做的是至少lldb在 Xcode 中启动一个裸会话,然后手动到process connect connect://hostname:port.

采纳答案by Chris Hanson

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.

Xcode 4 目前不支持远程 Mac 调试。即使您能够破解 Xcode 以与远程调试服务器通信,也不能保证 IDE 或远程调试服务器会完全或正确处理与它的交互。