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

Alison King
seal-mask
.a{fill-rule:evenodd;}techdegree
Alison King
iOS Development with Swift Techdegree Student 424 Points

Cannot see results of code

In my Xcode window I cannot see any results of my code in the results space. Following Xcode Help, I have gone to the Editor menu to unhide this but there is no unhide results or show results option available. What is wrong? Is my Xcode app damaged?

I cannot proceed until I sort this out. Any advice please?

Thanks

Alison

2 Answers

r h
r h
68,552 Points

Click the [_] icon in the upper right, in between the ||_] and [_|| icons. When you hover over it, it should say "Hide or show the debug area." Make sure it is blue to activate it, then it will pop up in the bottom of your XCode. Do some print statements to verify print statements are getting printed to the console. Remember, without print statements, running code usually doesn't produce any output (print statements are categorized under "IO", or "input/output").

r h
r h
68,552 Points

println("hello world!")

That dumps the value inside the function (the ( and ) signs) into the console. The console is like a terminal/command line. It can take in text and output text too.

In this case, the value that is being dumped/printed in the console is the "hello world!" string, which is denoted by the quotation marks (the text in between " and ").

Follow along as long as you can with this video (try to make it to the 10 min mark, or longer if you're still following along): https://www.youtube.com/watch?v=6Zf79Ns8_oY