在Xcode和iOS中调试应用程序启动 [英] Debugging a Application Launch in Xcode and iOS

查看:257
本文介绍了在Xcode和iOS中调试应用程序启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常特殊的情况需要调试。我需要检查在终止应用程序后重新启动时发生的情况(查看正在读取的存储数据等)。如果我从设备中杀死应用程序,调试器将停止(这很有意义)。

I have a very specific case that I need to debug. I need to examine what is happening when an application is relaunched after being killed (looking at what stored data is being read, etc.). If I kill the application from the device, the debugger stops (which makes sense).

我能想到的最好的方法是杀死应用程序,然后从中重新启动Xcode(无需修改任何代码)。我正在尝试调查现实世界的行为。这是对我来说最好的方法,还是有另一种方法来查看Xcode发生了什么?

The best method I can think of is killing the application, and re-launching from Xcode (without modifying any code). I am trying to investigate "real world" behaviour. Is this the best approach for my case, or is there another way to view what happening with Xcode?

推荐答案

在Scheme编辑器中在Xcode中,您可以编辑调试配置文件以使调试器等待XY.app启动。如果随后选择Product-> Run,则调试器应等待,直到您在设备上手动启动应用程序,然后自动附加到正在运行的进程。

In the Scheme editor in Xcode, you can edit the Debug profile to have the debugger "Wait for XY.app to launch". If you then select Product -> Run, the debugger should wait until you launch the app manually on the device and then automatically attach to the running process.

这篇关于在Xcode和iOS中调试应用程序启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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