简体   繁体   English

使用LLDB调试器时,Xcode 4.6挂在“附加到…”上

[英]Xcode 4.6 hangs on “Attaching to…” when using LLDB debugger

As the title says, I'm having issues using LLDB. 如标题所示,我在使用LLDB时遇到问题。 I've looked into this thread Xcode 4 hangs on attaching to (App name) when debugger is set to LLDB and followed the instructions given because I'm having exactly the same issue, and managed to debug by using GDB - it works flawlessly. 当调试器设置为LLDB时,我研究了此线程Xcode 4挂在附加到(应用程序名称)上的问题,并按照给出的说明进行了操作,因为我遇到的问题完全相同,并且可以通过使用GDB进行调试-它可以完美地工作。 Anyway, i'm working in a team and I'm the only one who's having this issue, so it's a bit annoying to switch back and forward from GDB to LLDB every time i commit changes so the workaround doesn't get synchronized in the remote repository. 无论如何,我正在一个团队中工作,而且我是唯一一个遇到此问题的人,所以每次我提交更改时都从GDB切换到LLDB有点烦人,这样解决方法就不会在远程存储库。

I've checked the compiler, and it's set to LLVM 4.2. 我已经检查了编译器,并将其设置为LLVM 4.2。 In fact, the app compiles perfectly and gets installed in the simulator (i can execute it once I kill and restart Xcode). 实际上,该应用程序可以完美编译并安装在模拟器中(杀死并重新启动Xcode后,我就可以执行它)。 I would try to reinstall Xcode, but it's a mess since it's a big-sized package and I have a limit on my internet usage, it would take a long while. 我会尝试重新安装Xcode,但由于它是大型程序包,而且我的互联网使用受到限制,所以这很麻烦。 Does anyone know what's happening here? 有人知道这里发生了什么吗? Is it possible that LLGB is bundled outside XCode, even if I failed to locate it on the system? LLGB是否有可能捆绑在XCode之外,即使我在系统上找不到它也是如此?

Any insight would be appreciated. 任何见识将不胜感激。 I can keep the workaround going, it's just that it's a bit annoying given my personal circumstances :-) 我可以继续解决问题,只是鉴于我的个人情况,它有点烦人:-)

EDIT: More details about what I mean by 'hung'. 编辑:关于“挂”我的意思的更多细节。 I start with Xcode open, and simulator closed (it doesn't even appear on the Dock). 我先打开Xcode,然后关闭模拟器(它甚至没有出现在Dock上)。 I click 'Run', the simulator is launched successfully, and the application shows the Splash Screen. 我单击“运行”,模拟器成功启动,并且应用程序显示启动画面。 Then xcode shows the message: "Attaching to ". 然后xcode显示消息:“附加到”。 And now it's hung. 现在挂了。 You can close the simulator, and xcode is still attaching. 您可以关闭模​​拟器,并且xcode仍在附加。 Both the Run and Stop buttons stop working. 运行和停止按钮都停止工作。 You can try to exit the application by right-clicking on the dock, you get an alert message, and from this point you can't even type code: XCode is fully hung. 您可以尝试通过右键单击扩展坞来退出应用程序,您会收到一条警告消息,从这一点上您甚至无法键入代码:XCode已完全挂起。 The only choice here is to kill XCode by using Cmd+Alt+Esc. 这里唯一的选择是使用Cmd + Alt + Esc杀死XCode。

This sounds like it could be the problem some folks were seeing in Why does the LLDB Debugger constantly fail to attach? 听起来这可能是某些人在LLDB调试器为什么总是无法连接的问题中看到的问题 where they'd modified their /etc/hosts file so when Xcode tried to connect to debugserver via "localhost", the connection was never set up. 他们修改了/etc/hosts文件的位置,因此当Xcode尝试通过“ localhost”连接到debugserver时,从未建立连接。

When Xcode hangs, try switching to Simulator by clicking on its Dock icon. Xcode挂起时,请尝试通过单击其Dock图标切换到Simulator。 Don't use Cmd+Tab. 不要使用Cmd + Tab。

升级到XCode 4.6.2为我解决了此问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM