iOS:调试在XCode中不起作用 [英] iOS: Debugging not working in XCode

查看:154
本文介绍了iOS:调试在XCode中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 XCode 4 iOS SDK 4.3。
我的调试工作正常,但现在我发现,当设置断点时,应用程序会暂停,但是XCode不会在编辑器中的行上。此外,当击中断点时,绿色箭头也不会显示。
我有一个 UINavigationController ,它在 AppDelegate 中分配。当我在 didFinishLaunchingWithOptions 中设置断点时,一切都按预期工作:

I'm using XCode 4 and iOS SDK 4.3. My debugging worked fine but now i discovered that when setting a breakpoint, the app pauses but XCode doesn't focus on the line in the Editor. Also the green arrow is not displayed when hitting the break point. I have a UINavigationController which is allocated in the AppDelegate. When i set a breakpoint in the didFinishLaunchingWithOptions everything works as expected:

这是当ia断点暂停了mapViewController中的应用程序时第一个项目添加到导航控制器。 (没有绿色箭头但应用程式已暂停):

This is when i a breakpoint has paused the app in the mapViewController which is the first item added to the navigation controller. (No green arrow but app is paused):

我真的不知道为什么调试正在AppDelegate中工作,但不在此控制器中。
如果您需要其他信息或屏幕截图以帮助我,请告诉我。

I really have no clue why debugging is working in AppDelegate but not in this controller. If you need additional info or screenshots in order to help me, please tell me.

更新:

UPDATE:

现在在 AppDelegate 中甚至没有工作,并且没有改变。我也可以浏览这些行,并且可以看到这些值在本地区域中分配,因此可以猜测应用程序当前在代码中的位置。所以很明显,一切正常,只是当前执行的行没有被标记为应该。

Now it's even not working in AppDelegate and changed nothing. I can also step through the lines and can see that values are assigned in the Locals and can therefore guess where the app is currently in the code. So obviously everything works, just the currently executed line is not marked as it should.

推荐答案

在xCode4中:


  • 您的项目名称 - >编辑方案

  • 信息选项卡(在运行配置中)


  • 运行您的项目

  • Your Project Name -> Edit Scheme
  • Info tab (in run configuration)
  • Set Build Configuration to "Debug", Debugger - to "LLDB" ("GDB" was before)
  • Run your project

为我工作对于LLDB绿线是可见的。切换回GDB,再次带给我这个问题。

Worked for me. For "LLDB" green line is visible. Switching back to "GDB" brings me to this issue again.

这篇关于iOS:调试在XCode中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆