Xcode调试未显示值 [英] Xcode Debugging not showing values

查看:151
本文介绍了Xcode调试未显示值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我完全迷住了.我已经调试了一年多,并且只有在构建配置"设置为发布"时才遇到此问题.我将构建配置"设置为调试",并且已经检查以确保我附加到正确的进程,但是在单步执行代码时仍然看不到这些值.还有其他人遇到过这个问题吗?

I'm completely stumped. I've been debugging for over a year and have only had this problem when the Build Configuration was set to Release. I have the Build Configuration set to Debug and I have checked to be sure I am attaching to the correct process and yet I still cannot see the values while stepping through the code. Has anybody else ran into this issue?

以下是屏幕截图:

该值正在返回,但是我无法在此方法或任何其他方法中看到任何值,并且我无法弄清原因.

The value is returning, but I am unable to see the values of ANYTHING in this method or any of the other methods and I cannot figure out why.

谢谢您给我的任何提示.

Thank you for any hints you can give me.

=============================更新================ ==================

============================== UPDATE ==================================

我尝试打印出值,这是我收到的输出:

I've tried to print out the valued and this is the output I receive:

但是请注意,即使我无法打印出来,变量"视图中的值对于结果也是正确的.但是其他值,例如filePath不应为nil.

Notice though, that the value in the Variables view is correct for the result, even though I can't print it out. But the other values, like filePath should not be nil.

这太奇怪了.

==============================更新================ ==================

============================== UPDATE ==================================

我将断点放在return语句上,仍然没有运气:

I put the breakpoint on the return statement and still no luck:

这次,我看不出结果的价值:

This time I see no value for result:

推荐答案

我遇到了同样的问题,在鼠标悬停并观察每个变量的部分时,它显示nil值,而在NSLog上显示这些变量时,它正在打印正确的值.

I was facing the same issue, On mouse hover and watch section for every variable it was showing nil value but while NSLog for those variables it was printing correct value.

现在已修复.试试这个

转到产品菜单>方案>编辑方案或 + <

Go to Product menu > Scheme > Edit scheme or +<

在运行"中,转到信息"选项卡,将构建配置更改为调试". 希望它能工作.

In Run go to Info tab, change the build configuration to "debug". Hope it will work.

这篇关于Xcode调试未显示值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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