14

The question in the topic: Why no print output in Console using Simulator? Is it disabled or this is a bug?

pkamb
  • 33,281
  • 23
  • 160
  • 191
Alex Pilugin
  • 683
  • 2
  • 10
  • 38
  • 1
    In the debug area, hit the right half-square. show the console – Nazmul Hasan Sep 24 '16 at 12:14
  • 1
    also try View --> Debug Area --> Activate Console – Nazmul Hasan Sep 24 '16 at 12:18
  • 2
    Thank you Nazrul Hasan! Activate Console command helps. Also I customized Sheme: I added environment variable: "OS_ACTIVITY_MODE" with "disable" value. I thought it hides only os notifications. – Alex Pilugin Sep 24 '16 at 14:02
  • Also, to activate console with keyboard shortcut `Shift + Command ⌘ + C` - Xcode 8.3.3 – DJ2 Aug 15 '17 at 15:21
  • Sometimes you have to restart the Xcode even if the console is activated. So quite the Xcode and reopen the project. It worked for me. – Udaya Sri Apr 03 '18 at 09:00

3 Answers3

43

Try with this way

View --> Debug Area --> Activate Console

Nazmul Hasan
  • 10,130
  • 7
  • 50
  • 73
  • That wasn't me, but basically the question is about a different, much more complex problem: http://stackoverflow.com/questions/19828670/xcode-doesnt-write-anything-to-output-console – Victor Sergienko Apr 29 '17 at 04:31
  • bless your soul haha, spent way too long being confused about this. – Colonel_Old Dec 08 '18 at 23:29
11

same answer as @Nazmul Hasan, but with an image to help others.

enter image description here

Edess Elder
  • 1,461
  • 13
  • 9
0

I found that you could not type print("the data you want to print") in normal class with no type.

You need to type this code in general viewController, such as UIViewController or UITableViewController.

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
Datoto
  • 53
  • 7