在Xcode中调试静态库 [英] Debugging a static library in Xcode

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

问题描述

我正在构建一个静态库,但是没有收到编译错误,但是,当我将其链接到演示项目(基本单视图应用程序)时。我无法进入从静态库调用的方法来对其进行调试...

I am building a static library and am receiving no compiling errors, however, when I link it against a demo project(basic single view app). I cannot step into the methods called from the static library to debug it...

我没有收到任何运行时错误,但是我认为这是因为它没有被执行由于未显示我的NSLogs并且未返回任何内容而执行了该操作...

I'm not receiving any runtime errors, but I think that is because it's not being executed due to the fact my NSLogs are not being shown, and it's not returning anything...

基本上,如何调试通过演示应用程序创建的静态库我还创建了..

Basically, how do I debug a static library I created through the demo app I also created..

我该怎么办?我需要帮助!

What do I do? I need help!!

预先感谢...

推荐答案

要使用运行时调试器,应将静态库项目添加为子项目到要调试的示例。

To use runtime debugger you should add your static library project as subproject to your sample where you want to debug it.

请确保 GENERATE_DEBUG_SYMBOLS 设置为YES(调试模式)为您的 static 库。

Make sure that GENERATE_DEBUG_SYMBOLS is set to YES (debug mode) for your static lib.

如果在项目中使用,则编译为 static 库(libYourLib.a),您将无法进入方法,但仍然应该看到 NSLog 出现。

In case of using in project compiled static library (libYourLib.a) you won't be able step into methods but still should see NSLog coming.

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

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