So every other IDE I have ever used, if there is some statement in the code with a break point set, there is a way to evaluate that statement to see what it is returning, ie immediate windows in visual studio, or using watch menu. Is there anything somewhat equivalent in XCode, or some way to evaluate a statement within a section of code?

ex:

if (CGRectContainsPoint([FGO BoundingBox], touchLocation))

Is returning false, so I'd like to see what [FGO BoundingBox] is evaluating to, but I can't seem to figure anything out short of changing the code to store it in an intermediate variable. Assuming I have a break point on this line in XCode what is the easiest way to see what this statement will return?

有帮助吗?

解决方案

You can try:

po [FGO BoundingBox]

or

po NSStringFromCGRect([FGO BoundingBox])

also check out

help expression

in the debugger.

其他提示

Break on that line, then step in to the "BoundingBox" function and step to the end of it (or where it returns something) and you should see what it's returning.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top