Mac应用程序的stdout在哪里? [英] Where is stdout for a Mac App?

查看:491
本文介绍了Mac应用程序的stdout在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以前,stdout转到控制台日志,由Console.app显示。我一直有一些firefox插件的问题(看到其他问题,对垃圾邮件的遗憾...),我试图使用printfs至少看看我是否开始我的插件。

It used to be that stdout went to the console log, displayed by Console.app. I've been having some problems with a firefox plugin (see other questions, sorry about the spam...) and I was trying to use printfs to at least see if I was STARTING my plugin.

我刚刚注意到,我的控制台日志自从1月6日以来没有更新。(是的,我在过去一个月一直在使用机器)我不是唯一使用控制台日志的程序,所以所有这些消息必须去SOMEWHERE其他。

I just noticed today that my console log hasn't been updated since January 6. (Yes, I've been using the machine for the past month.) Now, I'm not the only program that uses the console log, so all those messages must be going SOMEWHERE else.

有谁知道在哪里?

问题是syslogd被破坏了。它现在是固定的。

The problem was that syslogd was broken. It's fixed now.

推荐答案

printf应该去控制台。这听起来像是你的破碎。

printf should be going to the Console.app. It sounds like yours is broken.

调试你的插件的一个好方法是将FireFox设置为XCode项目的自定义可执行文件,并在调试器中运行。然后XCode控制台将捕获输出。
在这种情况下,你也只是使用一个断点,看看你的插件是否加载而不是printf。

A good way to debug your plugin would be to set FireFox as your XCode project's Custom Executable, and run in the debugger. Then the XCode Console would catch the output. In that case you also just use a breakpoint to see if your plugin was loading instead of printf.

这篇关于Mac应用程序的stdout在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆