Xcode 4.3 和 iOS 3.x 设备上的调试
我上周刚刚通过 Mac App Store 将 Xcode 更新到版本 4.3,发现我无法再在 iOS 3.x 设备上进行调试。我有运行 iOS 3.1.3 的 iPhone 3G 和运行 iOS 3.2 的第一代 iPad。
在这两种设备上,Xcode 4.3 似乎都会安装该应用程序并尝试启动该应用程序。该应用程序显示启动屏幕但从未完成启动。调试器输出窗口中没有错误消息或任何类型的消息。我唯一的线索是,当我按下暂停按钮时,我可以看到设备/Xcode 卡在以下函数中:addimagesToAllImages,它似乎与 Apple 的 DYLD 相关。
调试在 iOS 5 设备上运行良好,并且在之前的 Xcode 4.2 安装上也能正常运行。我已重新启动我的 Mac、iOS 3.x 设备,行为没有任何变化,包括清除所有缓存。
有人对发生的事情有任何想法吗?感谢您的帮助。
I just updated Xcode to version 4.3 via the Mac App Store last week, and discovered that I can no longer debug on iOS 3.x devices. I have the iPhone 3G running iOS 3.1.3 and a 1st Gen iPad running iOS 3.2.
On both devices it appears that Xcode 4.3 installs the app and attempts to launch the app. The app displays the splash screen but never completes booting. There are no error messages or messages of any kind in the debugger output window. My only clue is when I press the pause button I can see that the device/Xcode is stuck in the following function: addimagesToAllImages which appears to be related to Apple's DYLD.
Debugging works fine on iOS 5 devices and worked on the previous Xcode 4.2 installation. I've rebooted my Mac, iOS 3.x devices with no change in behavior including clearing out all cache(s).
Anyone have any ideas as to what's going on? Thanks for the help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
好吧,根据Junior B关于调试器的提示我想通了。我进入“管理方案”并选择我正在处理的方案并单击“编辑”。在“运行”部分下,我将调试器从 LLVM 更改为 GDB。现在,在 iOS 3.x 和 5.x 设备上调试工作正常。另外,我将编译器保留为 xcode 的首选设置 LLVM 3.1。
希望这可以帮助其他接受 xcode 升级顾问推荐设置和 iOS 3.x 调试中断的人。
Ok, I figured it out with Junior B's hint about the debugger. I went to "Manage Schemes" and selected the Scheme I'm working on and clicked "Edit". Under the "Run" section I changed the Debugger from LLVM to GDB. Now debugging on iOS 3.x and 5.x devices work fine. Also, I left the compiler to xcode's preferred setting of LLVM 3.1.
Hopefully this helps someone else that accepts xcode's upgrade adviser recommended settings and their iOS 3.x debugging breaks.
您是否安装了“iOS 3.0 - 3.2.2 设备调试支持”组件?
从菜单栏中选择 Xcode >首选项...,然后在“首选项”窗口中选择“下载”>“成分。找到 iOS 3.0 支持行并单击“安装”按钮。
Have you installed the “iOS 3.0 - 3.2.2 Device Debugging Support” component?
From the menu bar, choose Xcode > Preferences…, then in the Preferences window choose Downloads > Components. Find the line for iOS 3.0 support and click the Install button.
当遇到同样的问题时,仅仅从 LLDB 切换到 GDB 对我来说还不够。由于我在 git 中有一个较旧的工作提交,我弄清楚了 Xcode 项目设置中的哪些更改在我的情况下导致了错误。因此,我可以通过从 $PROJECT.xcodeproj/project.pbxproj 中删除所有出现的以下行来解决该问题
此外,我将值从
回恢复为
由于我将我的方案配置为“共享”,这些设置也被存储在项目目录中(项目 .xcodeproj 目录中的 subdir.'xcshareddata'),因此更改在 git 中也可见。我恢复的另一个更改是删除“$PROJECT.xcodeproj/xcshareddata/xcschemes/$PROJECT.xcscheme”中的这两行:
.xcsheme 文件中的另一个更改是“selectedDebuggerIdentifier”和“selectedLauncherIdentifier”的值以“.GDB”结尾' 而不是 '.LLDB',但这实际上与您按照接受的标准得到的结果相同韦斯利的回答。
这些更改解决了我的问题,我可以在运行 iOS 3.1.3 的 iPhone Classic 上再次进行调试。
但是,我强烈建议在使用您最喜欢的文本编辑器应用这些编辑之前使用 Git 等版本控制系统(或至少本地备份!)。
Only switching from LLDB to GDB wasn't enough for me when encountering the same problem. As I had an older working commit in git, I figured out which changes in the Xcode project setting let in my case to the error. Thus I could resolve the issue by removing all occurrences of the following line from my $PROJECT.xcodeproj/project.pbxproj
Also, I reverted the value from
back to
As I have my schemes configured to be 'Shared', these settings are also stored in the project directory (subdir. 'xcshareddata' in the project .xcodeproj directory), and thus changes also visible in git. Another change I reverted were removing these two lines in '$PROJECT.xcodeproj/xcshareddata/xcschemes/$PROJECT.xcscheme':
Another change in the .xcsheme file were that the values of 'selectedDebuggerIdentifier' and 'selectedLauncherIdentifier' ended with '.GDB' instead of '.LLDB', but this is actually the same as you will get by following the accepted answer from Wesley.
Those changes solved for me the problem, and I could debug again on my iPhone Classic running on iOS 3.1.3.
However, I strongly recommend the use of a versioning system like Git (or at least a local backup!) before applying these edits with your favorite text editor.
我亲爱的朋友们,
“Xcode --> 首选项 --> 调试器 --> 选中自动清除调试控制台”
每次运行应用程序时结果都会清除控制台
Hai MyDear Friends,
"Xcode --> Preferences --> Debugger --> check Auto clear Debug console"
results clears the console every time You run the Application