使用Xcode调试库 [英] Debugging a library with Xcode

查看:134
本文介绍了使用Xcode调试库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在构建iPhone应用程序时,我有一个关于使用Xcode的库的更普遍的问题。我已经从一个项目创建了一个框架,我一直在使用它的一些部分在其他应用程序。这工作相当不错,到目前为止。但我不知道如何调试包含在包含的框架中的文件。

I have a more general question on working with libraries on with Xcode when building iPhone apps. I've created a framework from a project I've been working on to use some parts of it in other apps. That works pretty good, so far. But I have no idea how to debug into the files included in the included framework.

我希望能得到某种最佳实践。

I hope to get some kind of 'best practice' on that.

感谢很多

-f

Thanks a lot
–f

推荐答案

已经有很多讨论如何最好地使用静态库重用代码。我已经解决了Clint Harris所说的这里的方法(我认为这是Shawn也建议)。以这种方式创建项目依赖关系会自动编译项目目标(模拟器/设备,调试/发布)的库,这样就不需要编译库的四个不同副本。它还允许您在调试时根据需要进入库源。最后,在下次编译这些项目时,任何链接项目都包含对库的更新(因此,您不必重新编译和重新分发库二进制文件到这些项目)。

There have been a lot of discussions of how best to reuse code with static libraries. I've settled on the method described here by Clint Harris (which I think is what Shawn is suggesting as well). Creating a project dependency in this way automatically compiles the library for your project's target (simulator/device, debug/release) so you don't need four different copies of the compiled library sitting around. It also lets you step into the library source when debugging, as you want. Finally, updates to the library are included in any of the linked projects the next time those projects are compiled (so you don't have to recompile and redistribute the library binary to those projects yourself).

这篇关于使用Xcode调试库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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