我可以调试从ipa档案安装ios应用程序 [英] can i debug ios app installed from ipa archive

查看:445
本文介绍了我可以调试从ipa档案安装ios应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序有一些问题,只有当我安装它专用时才会再现,但如果我只是从Xcode运行应用程序,则不会重现。我想调试这个问题,但到目前为止我没有任何运气。我使用Xcode 5.1.1。这是我做的:


1)转到产品 - > Scheme->编辑方案 - >存档并设置build
配置到Debug。



2)代码签名身份设置为iPhone Developer。



3)生成调试符号设置为是。



4)转到产品 - >存档,在存档后,单击
分发,然后选择为企业或5)我的开发配置文件被选中。



6)点击导出并导出.ipa文件。



7)使用iPhone配置实用程序将该应用程序安装到
设备上。



8)在设备上运行应用程序。



9)在Xcode中,转到Debug-> Attach To Process->通过PID或Name,输入
应用程序名称。 Xcode已成功挂载,并表示在
iPad上运行应用程序。



10)但是,当我
执行时,我无法点击任何应该被击中的断点我的应用程序中的某些操作(如果我从Xcode
安装并运行应用程序,则所有断点都将被击中)。


我是否缺少某些东西?

解决方案

Jim Ingham,感谢您的答案。



我发现我无法调试到静态库的原因。在每个Xcode项目中,在部署部分下都有一个名为Strip Linked Product的设置。在我所有的项目中,这个设置设置为是。



为了调试通过归档构建的应用程序的静态库,我将此设置设置为否在每个依赖图书馆项目(以及主要项目)。调试/释放模式也可以设置不同。之后,我看到在归档期间构建的库符号,我可以调试到库代码。我希望这有助于某人。



不幸的是(或许幸运的是)当图书馆符号不被剥离时,我试图调试的错误不再再现。也许某些事情发生时,符号被剥离,我将需要进一步调查。


I m having some problem with my app which reproduces only when i install it ad hoc, but doesn't reproduce if i just run the app from Xcode. I would like to debug this problem, but so far i m not having any luck. I m using Xcode 5.1.1. Here is what i did:

1) Go to Product->Scheme->Edit Scheme->Archive and set build configuration to Debug.

2) Code signing identity is set to iPhone Developer.

3) Generate Debug Symbols is set to Yes.

4) Go to Product->Archive and after it is archived, click "Distribute", then choose "Save for Enterprise or Ad Hoc Deployment".

5) My development provisioning profile is selected.

6) Click "Export" and export the .ipa file.

7) Use iPhone configuration Utility to install the app onto the device.

8) Run the app on the device.

9) In Xcode, go to Debug->Attach To Process->By PID or Name, enter the app name. Xcode attaches successfully and says running the app on iPad.

10) However, i cannot hit any breakpoints which should be hit when i do certain actions in my app (if i install and run the app from Xcode instead, all breakpoints are hit).

Am i missing something?

解决方案

Jim Ingham, thanks for your answers.

I found the reason why i was unable to debug into static libraries. In each Xcode project, there is a setting called "Strip Linked Product" under "Deployment" section. In all my projects this setting was set to "Yes".

In order to debug into static libraries for an app built by archiving, i set this setting to "No" in each dependent library project (as well as the main project). This can also be set differently for Debug/Release modes. After this, i see the library symbols built during archiving and i m able to debug into library code. I hope this helps someone.

Unfortunately (or maybe fortunately) the bug i was trying to debug no longer reproduces when the library symbols are not stripped. Maybe something happens when the symbols are stripped, i will need to investigate further.

这篇关于我可以调试从ipa档案安装ios应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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