Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Swift Basics (retired) Types Printing Results

Raphael Reiter
Raphael Reiter
6,820 Points

Console output

Hi guys,

I cannot see the console output. I am using xCode 7 from the app store. I tried cmd+shift+y but i get a weird message at the bottom, and i dont seem to be able to print. help appreciated

What's the weird message? Is the code you're trying to use for output correct with no errors?

10 Answers

ok so look on the right side. Then press on the output in the standard editor(the one on the left by default). Then, you'll two small icons of an eye and a plus sign. The plus sign will put the console under the code and always make sure you right click and press value history. In addition, the eye makes you see the console in a small pop up.

Hope that helped!

Raphael Reiter
Raphael Reiter
6,820 Points

This is what I get : Sep 28 16:59:13 Numbers[2073] <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. Sep 28 16:59:13 Numbers[2073] <Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. Sep 28 16:59:13 Numbers[2073] <Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

I would like to get the rectangle like amit with the clean lines

Raphael Reiter
Raphael Reiter
6,820 Points

There are no stop signs with errors

Let's rule the code out first - what is the code that you're running in the playground?

When you downloaded Xcode 7 did you use a beta release - what version are you running?

Raphael Reiter
Raphael Reiter
6,820 Points

i am running everything he tells me to. he is a copy of it

//: Playground - noun: a place where people can play

import UIKit

let language = "Swift" let year = 2014 // int or Integer var version = 1.0 // Double = 15 decimal FLoat = 7 decimal var isAwesome: Bool = true // Boolean or Bool

I am on the version 7.0 that i downloaded from the app store. no beta version

Raphael Reiter
Raphael Reiter
6,820 Points

ok the eye is a good alternative ! i like it ! thanks a lot ! :)

Any time <3 by the way these videos are kinda outdated now. Next month they will update all of the course. Cause these videos were made for swift 1.0 and now you're using swift 2.0 . So, if you don't want to re-learn this material wait until the updated course come out.

Raphael Reiter
Raphael Reiter
6,820 Points

oh, thanks for the tip, do you know when that will be approximately?

they say in October when exactly I don't know. You can send the support team an email asking them they reply instantly!

Hi Christopher,

They moved the output screen when Swift 2.0 was released. You should be able to find it if you go to the View menu, then Debug Area | Show Debug Area.

I hope that gets it working for you.

Steve.