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
Try to press the trash bin icon.
I know it's silly, but in my case it worked. It might've refreshed the log output console:
Doubtful anyone will have my same issue, but mine was because my iPad was set to Single App Mode using JAMF or MVM Deployment, and it will not log anything to the console. Other devices print to the console, but the app that is in Single App Mode will not.
In the debug area, hit the right half-square.
N.B. area shrunk for image size. Yours should be wider.
Let's work this out step by step
NSLog posts to stderr stream and not stdout.
So, first check if you stdout also has the issue by using old school printf function (UTF8string). If this also doesn't work, the problem is most likely not with the logging function. If it does work, the problem maybe with stderr stream or the NSLog function
After this try logging to a file, by redirecting the stderr and then stdout also to a file. (freopen/dup2 function) If this logs properly, the problem may be in your Xcode project or console.
Please note that if you are already using some sort of redirection, then logs will not be printed in the console. They will either be printed in the console or the file ONLY
Try doing more similar experiments to localize your problem. Please comment on this answer with your observations to give us a better understanding of the issue
It can also be that somebody has put
#define NSLog(...);
into your code. This elimitaes almost all output.
I've build a new scheme, and on the Launch option I checked: "Wait for executable to be launched" (as in the picture below)
and apparently that disables the NSLog... according to this:
NSLog not working when "wait for executable to be launched" is set