문제

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