Xcode中的表达式4.3.2未评估调试区域 [英] Expression in Xcode 4.3.2 Debug area not evaluated

查看:140
本文介绍了Xcode中的表达式4.3.2未评估调试区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做错事。我添加了一个表达式,我可以在调试区域中看到具有E符号的表达式,但表达式未被计算,其值不会显示在那里(它在当时的范围内)。



当我直接使用调试器(lldb)时,它的效果很好。





Xcode 4.3.2。



我应该怎么做?



谢谢

解决方案

您正在尝试评估一个布尔值并将其作为对象打印。



您要使用 print [self isEditing] print(BOOL)[self isEditing] ,具体取决于调试器是否不知道成员的类型。 >

po 命令打印对象描述,而不是任意值,只有当表达式的结果权利是一个对象,如 po se lf



表达式编辑器中出现同样的问题。如果您使用表达式 [self isEditing] ,则调试器将无法理解。但是,如果您使用(BOOL)[self isEditing] ,则会正确显示。


I'm doing something wrong. I have added an expression, I can see the expression with the "E" symbol in the Debug area, but the expression is not being evaluated, its value is not displayed there (it is in scope at that time).

When I use the debugger (lldb) directly, it works well.

Xcode 4.3.2.

What should I do?

Thanks

解决方案

You are trying to evaluate a boolean and print it as an object.

You want to use print [self isEditing] or print (BOOL)[self isEditing], depending upon whether the debugger complains that it doesn't know the type of the member or not.

The po command prints an object description, not an arbitrary value, and should only be used when the result of the expression on the right is an object, such as po self.

The same problem occurs in the expression editor. If you use the expression [self isEditing], the debugger won't understand it. However, if you use (BOOL)[self isEditing], it will display correctly.

这篇关于Xcode中的表达式4.3.2未评估调试区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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