Xcode中的表达式4.3.2未评估调试区域 [英] Expression in Xcode 4.3.2 Debug area not evaluated
问题描述
当我直接使用调试器(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屋!