OCUnit、NSLog 和 XCode 3.1
我一直在 XCode 3.0 中使用 OCUnit(XCode 附带的默认安装)。 我很高兴能够运行我的测试并在“构建结果”窗口中查看结果,以及我输出的任何 NSLog() 消息。
然而,使用 XCode 3.1 测试运行良好,但我突然丢失了 NSLog() 输出。 有人知道它去哪儿了吗?
I'd been using OCUnit (the default installation that comes with XCode) in XCode 3.0. I've been happy being able to run my tests and see the results in the Build Results window, as well as any NSLog() messages I output.
However, with XCode 3.1 the tests run fine, but I suddenly lose my NSLog() output. Anybody know where it went?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我自己刚刚学习这些东西,并且不得不四处寻找来回答这个问题(XCode 3.1.2)。
运行后进入构建结果窗口。 它可能不会自动打开,具体取决于配置。 如果需要,构建/构建结果菜单选项将打开它。
在两个窗格之间的中间区域,您会在左侧看到 4 个按钮。 第三个图标只有 3-4 条水平线。 单击该按钮可切换构建记录。 这显示了运行的所有构建步骤和 NSLog() 输出。
Just learning this stuff myself and had to poke around to answer that very question (XCode 3.1.2).
Go to the Build Results window after running. It may not open automatically, depending on configuration. Build / Build Results menu option will open it if needed.
In the middle area between the two panes, you'll see 4 buttons on the left. The 3rd icon is just 3-4 horizontal lines. Click that to toggle the build transcript. That shows all build steps and NSLog() output from the run.
虽然这很不方便,但我发现 NSLog() 消息会发送到 OSX Console.app。
应用领域>> 公用事业> Console.app 我通过 otest 过滤以查看输出。
我无法使上述任何方法发挥作用。
While it's inconvenient, I found NSLog() messages going to the OSX Console.app.
Applications > Utilities > Console.app I filtered by otest to see output.
I couldn't get any of the above methods to work.
(在菜单栏上)运行 -> 控制台 (Shift-Apple-R)
(on the menu-bar) Run -> Console (Shift-Apple-R)