xcode 应用程序重启后如何查看iphone日志记录(NSLog)?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5684893/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 20:50:37  来源:igfitidea点击:

how to see iphone logging (NSLog) after app restart?

iphonexcodeiosnslog

提问by Greg

How could I view iphone logging (eg NSLog) after app restart?

应用程序重启后如何查看 iphone 日志记录(例如 NSLog)?

I'm interested in the answer both for using the (a) simulator and (b) an IOS device.

我对使用 (a) 模拟器和 (b) IOS 设备的答案很感兴趣。

Background - In this case I have some issues no doubt in my code with how the application is supposed to launch, get previous state, and goto the controller/view it was at prior to it being terminated. Hence I want to see the logging as it starts up.

背景 - 在这种情况下,我的代码中无疑存在一些问题,即应用程序应该如何启动、获取先前状态以及转到它在终止之前所在的控制器/视图。因此,我想在启动时查看日志记录。

采纳答案by Ravin

For seeing device logs, you can use Organizertool available in XCode(your device should be connected with system).

要查看设备日志,您可以使用XCode 中提供的管理器工具(您的设备应与系统连接)。

For simulator you will have to re-run application from XCode.

对于模拟器,您必须从XCode重新运行应用程序。

Thanks,

谢谢,