4

ok what changed in xCode7 / Swift that I can no longer use "po frame" to view the contents of a CGRect anylonger? The print statment works just fine in the code. How come I can't view that in the debugger console like I used to?

var frame = self.myLabel.frame

frame.origin.x = self.startingFrame.origin.x + translation.x
frame.origin.y = self.startingFrame.origin.y + translation.y

print(frame)

self.myLabel.frame = frame

yet in the debugger if I break on the self.myLabel.frame = frame statement and use po (or p or print) in the debugger I get:

(164.0, 323.0, 41.6666666666667, 20.3333333333333)
(lldb) po frame
error: <EXPR>:1:1: error: use of unresolved identifier 'frame'
frame
^~~~~
(lldb) p frame
error: <EXPR>:1:1: error: use of unresolved identifier 'frame'
frame
^~~~~
(lldb) print frame
error: <EXPR>:1:1: error: use of unresolved identifier 'frame'
frame
^~~~~
(lldb) 
3
  • 1
    You are asking "Why", that question can only be answered by Apple: bugreporter. Commented Oct 19, 2015 at 15:13
  • Hey @zaph, I asked because I thought maybe I was missing something very basic in the debugger that I can't find any longer in the Apple Docs Commented Oct 19, 2015 at 16:57
  • You might have better success asking how to with examples of XCcode 7 failures. Commented Oct 19, 2015 at 17:01

2 Answers 2

3

This is a bug in Xcode 7.1. It is fixed in the current 7.2 beta, and will be fixed in the final. The bug is that the types for Structs imported from C/ObjC modules into Swift are not available to the debugger (and in turn it won't report variables whose types are unavailable.)

Sign up to request clarification or add additional context in comments.

Comments

0

I am still seeing this in Xcode 7.2 (using ObjC). Makes it very frustrating debugging layout code.

The debugger doesn't show the frame as an ivar of the views and type summaries won't print it. You have to 'po foo.frame' to see it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.