如何在Xcode中的框架中进行调试? [英] How can I debug in a framework in Xcode?

查看:109
本文介绍了如何在Xcode中的框架中进行调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个项目,一个是 networkLib 用于登录和其他一些网络功能,另一个是 usingLibDemo 。所以我有两个项目的所有源代码。

I have two projects, one is the networkLib for login and some other network function, the other is the usingLibDemo. So I have all the source code of both projects.

networkLib 项目输出一个名为<$ c的框架$ c> myNetKit.framework ,由 usingLibDemo 使用。

The networkLib project outputs a framework, called myNetKit.framework, which is used by usingLibDemo.

现在我成功使用 myNetKit.framework 登录,但有时崩溃,可能在main()没有堆栈信息,但有时Xcode给我堆栈信息如下:

Now I successfully use myNetKit.framework to login, but sometimes it crashes, maybe in main() without stack information, but sometimes Xcode gives me the stack info like below:

所以我知道崩溃的地方:

So I know where it crashes:

Utils.m 未公开, Xcode如何获取堆栈信息崩溃线,并最终为我打开源文件?因为我的磁盘中有源代码?

But the Utils.m is not exposed, how Xcode gets the stack info and the crash line, and eventually open the source file for me? Because that I have the source code in my disk?

如果是这样,如果没有崩溃,我如何逐步调试 myNetKit.framework

If so, how can I debug the myNetKit.framework step by step, when it is not crashed?

非常感谢任何提示。

推荐答案

您还可以添加整个库( networkLib )项目进入项目并通过在项目设置中添加依赖项动态链接库。因此,您可以在项目中拥有所有源代码。所以你可以在运行时调试它。

You can also add the entire library (networkLib) project into your project and link the library dynamically by adding dependency in project settings. So you can have all the source code within your project. So you can debug it in run time.

这篇关于如何在Xcode中的框架中进行调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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