如何在Xcode调试会话之外查看iOS应用的崩溃日志? [英] Way to see crash logs for an iOS app outside of an Xcode debugging session?

查看:361
本文介绍了如何在Xcode调试会话之外查看iOS应用的崩溃日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,用户在使用该应用程序之前需要先登录。

I have an app where the user needs to login before using it .

为了增强用户体验,用户只需要在首次登录时登录,每次有时应用程序将不会显示登录屏幕,但会显示应用程序[我正在使用用户默认值存储他的ID]
现在,我已经实现了这一点,但是我遇到了一个错误,当我打开它时,应用程序崩溃了成功登录后..

to enhance the user experience , the user needs only to login at the first time and each other time the app will not show the login screen but it will show the app [ I am using user default to store his id ] now I have achieved this but I ran into a bug and the app crashes when I open it after a succeeded login ..

问题是:
模仿了我无需登录即可打开应用程序的情况,我必须停止应用程序[这意味着将没有调试会话],然后重新打开应用程序..

The problem is : to mimic the scenario where I open the app without the need to login , I had to stop the app [ which means there will be no debugging session ] and then reopen the app ..

我要的是什么:
是否有办法知道我不在调试会话中运行该应用程序的原因,导致错误的原因?

What I am asking for : is there a way to see what causes the bug knowing that I am not running the app in a debugging session ?

预先感谢

推荐答案

可以在设备上运行应用程序吗?如果这样,则可以获取崩溃数据您需要从设备窗口,来自Xcode。

Can you run your app on a device? If so, you might be able to get the crash data you need from the Devices window, from Xcode.

Xcode->窗口->设备。

Xcode -> Window -> Devices.

选择您的设备,然后选择查看设备日志

Select your device, then select View Device Logs.

此处是有关此主题的苹果页面

在模拟器中运行,您也许可以从控制台获取所需的崩溃数据(我刚刚尝试过此操作,并且从当前开发中至少看到了一个崩溃日志)。

For running in the simulator, you may be able to get the crash data you need from the Console (I've just tried this and seen at least one crash log from my current development).

这是Apple在使用模拟器进行测试。在左侧菜单中,查看查看崩溃日志。从该页面中提取...

Here is Apple's page on Testing with the Simulator. From the menu on the left, check out Viewing Crash Logs. Extract from that page...


要查看崩溃日志

To view a crash log


  1. 通过转到Finder中的应用程序/实用工具/控制台打开控制台。

  2. 在控制台中查找显示为已保存崩溃报告的行。

  3. 使用左侧的箭头扩展此项。

  4. 点击打开报告。

  1. Open Console by going to Applications/Utilities/Console in the Finder.
  2. Look for the line in Console that reads "Saved Crash Report for."
  3. Expand this item using the arrow at the left.
  4. Click Open Report.


这篇关于如何在Xcode调试会话之外查看iOS应用的崩溃日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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