Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 8 (Swift) No print output in Console

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

like image 757
Alex Pilugin Avatar asked Sep 24 '16 11:09

Alex Pilugin


People also ask

How do I print from Xcode console?

In Swift with Xcode you can use either print() or NSLog() . print() just outputs your text.

Where is print output in Xcode?

Press ⇧⌘Y or choose View > Debug Area > Show Debug Area to show the console output (or ⇧⌘C / Activate Console). Usually, this window will open automatically when your program produces output (this is controlled by the Behaviors section of Xcode's Preferences).

Where can I find NSLog?

NSLog() output on the simulator does indeed show up in the Console Mac OS X application. Go to All Messages and then filter based on your app name to get rid of the fluff, and run again. You'll see it in your output if the NSLog code is actually being hit during the execution of your program.


2 Answers

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

enter image description here

like image 185
Edess Elder Avatar answered Oct 08 '22 04:10

Edess Elder


Try with this way

View --> Debug Area --> Activate Console

like image 39
Nazmul Hasan Avatar answered Oct 08 '22 04:10

Nazmul Hasan