Xcode doesn't write anything to output console

前端 未结 15 1300
执笔经年
执笔经年 2020-12-06 09:00

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

15条回答
  •  忘掉有多难
    2020-12-06 09:55

    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

提交回复
热议问题