我可以调试从IPA存档安装的iOS应用吗? [英] Can I debug iOS app installed from IPA archive?

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

问题描述

我的应用程序存在一些问题,只有在我特意安装时才会重现,但如果我只是从Xcode运行应用程序则无法重现。我想调试这个问题,但到目前为止我没有运气。我正在使用Xcode 5.1.1。这是我做的:

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)转到Product-> Scheme-> Edit Scheme-> Archive并设置build
配置为Debug。

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

2)代码签名标识设置为iPhone Developer。

2) Code signing identity is set to iPhone Developer.

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

3) Generate Debug Symbols is set to Yes.

4)转到产品 - >存档,存档后,单击
分发,然后选择保存为企业或Ad Hoc Deployment。

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

5)我的开发配置文件被选中。

5) My development provisioning profile is selected.

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

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

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

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

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

8) Run the app on the device.

9)在Xcode中,转到Debug-> Attach To Process->按PID或名称,输入
应用名称。 Xcode成功附加,并表示在
iPad上运行应用程序。

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)然而,我无法点击任何应该在i
时被击中的断点我的应用程序中的某些操作(如果我从Xcode
安装并运行应用程序,则会触发所有断点)。

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).

我错过了什么吗?

推荐答案

Jim Ingham,谢谢你的回答。

Jim Ingham, thanks for your answers.

我找到了无法调试静态库的原因。在每个Xcode项目中,部署部分下都有一个名为剥离链接产品的设置。在我的所有项目中,此设置设置为是。

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天全站免登陆