luis
luis

Reputation: 2305

CGPoint, NSTimeInterval not showing value on debugger view

I cannot see the values of local variables of type CGPoint or NSTimeInterval in the debugger's variables window. To reproduce it all I do is the following:

let x = 5 * 4
let y = CGPoint(x: 5, y: 4)
<Breakpoint here>

When cursor stops at the given breakpoint the debugger variables window show the value of x to be equal to 20 and it does not show a value for y, and when I hover on y it shows a tool tip text saying "y".

I wonder what's causing this problem?

Thanks!

I am using Xcode 7.1 and Swift 2.1

Doing "po y" will give me the following error: error: :1:1: error: use of unresolved identifier 'y'

Upvotes: 2

Views: 131

Answers (2)

luis
luis

Reputation: 2305

This seems to be a bug. I have filed it to Apple under bug #23266337, they have marked it as duplicate for bug #23088739

Upvotes: 0

spirographer
spirographer

Reputation: 630

Try simply "print y" because y is a struct not an object.

Upvotes: 1

Related Questions