Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode doesn't write anything to output console

Tags:

xcode

ios

I am working on an iPhone/iPad app. All of a sudden output console stopped displaying ANY messages AT ALL. I tried to open older project - works just fine. So I thought that local project's repository got corrupted somehow, so I tried to create a new project - no messages at all are getting written to console output. Did I do something with Xcode settings accidentally? I am at a complete loss and frustrated.

Please help if you have any ideas.

Thanks.

like image 249
ITGronk Avatar asked Nov 07 '13 05:11

ITGronk


People also ask

How do I display output in XCode?

If you just want to have the log output display when you run your app then you can go into XCode4 preferences -> Alerts and click on 'Run starts' on the left hand column. Then select 'Show Debugger' and when you run the app the NSLog output will be displayed below the editor pane.

How do you type in XCode console?

Are you using the XCode console? You can access it under the "Run" menu, just below the Debugger. The shortcut is command-shift-R . From there you can interact with the application exactly like a terminal, but from inside of XCode itself.

How do I enable debug mode in XCode?

When you run an application in Xcode, the debugger is automatically started and attached to the process of the application. Click the Run button in the top left or press Command + R. From the moment the application is up and running, we can start inspecting the process and, if necessary, debug it.

How do you print a variable in Swift?

In Swift, you can print a variable or a constant to the screen using the print() function.


2 Answers

In the debug area, hit the right half-square.

debug area

N.B. area shrunk for image size. Yours should be wider.

like image 123
Kevin Avatar answered Sep 20 '22 11:09

Kevin


This question appears all over the place and is a valid one pointing to a random bug in most versions of xcode. Obviously the majority of people arriving at these answers are just unable to use xcode and therefore credit the 'show the console' type answers. I have worked on a single major project for 6 years now and this appears every month or so. I reboot devices, restart xcode, stand in the corner singing yankee doodle dandy. Nothing has occurred to me as an obvious and repeatable fix. Eventually I will start work one morning and it will be working again. Nothing I have done will be an obvious fix, no updates will have been installed. Just a heads up to those thinking they are going mad.

like image 41
amergin Avatar answered Sep 21 '22 11:09

amergin