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.
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.
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.
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.
In Swift, you can print a variable or a constant to the screen using the print() function.
In the debug area, hit the right half-square.
N.B. area shrunk for image size. Yours should be wider.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With