在iphone应用程序中登录调试信息的最佳方法是什么? [英] What's the best way to log debug info in an iphone app?

查看:141
本文介绍了在iphone应用程序中登录调试信息的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一些标准的方法,或有人写的东西,允许您记录一个消息,并将其显示在iPhone屏幕上的小滚动部分或iPhone模拟器中的单独窗口中?



更新:
对于像我这样不知道的noobs,请使用下面描述的NSLog方法,并确保选择Run-> Console显示控制台。



仍然想知道是否有人写了一个简单的记录器,显示在iphone本身....

解决方案

Objective-C(更正确的,真正的)方法是

  NSLog ); 

但标准的C方法也可以工作

  printf(message); 


Is there some standard way or has anyone written something that allows you to log a message and have it be displayed either in a small scrolling section on the iphone screen or in a separate window in the iphone simulator?

Update: For noobs like me and don't know, use the NSLog methods as decribed below and make sure you select Run->Console to display the console.

Would still like to know if anyone has written a simple logger that displays on the iphone itself....

解决方案

The Objective-C (more correct, really) method is

NSLog(@"message");

But the standard C method will work also

printf("message");

这篇关于在iphone应用程序中登录调试信息的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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