如何在Xcode中使用带有嵌套静态库的调试器?

时间:2022-07-22 02:37:22

A project that I've inherited has the following structure:

我继承的一个项目有以下结构:

Project A produces a static library.

项目A生成一个静态库。

Project B produces a static library and links with library A.

项目B生成一个静态库并与库a链接。

Project C produces the executable and links with library B.

项目C生成可执行文件和与库B的链接。

When I run app in debug mode, I can successfully debug code within the executable (project C) and the static library from project B. I can't, however, debug anything in the Project A library -- my breakpoints are ignored. I've checked and made sure that debug symbols are enabled and not stripped. Is there something else I'm missing?

当我在调试模式下运行app时,我可以在可执行文件(项目C)和项目b的静态库中成功地调试代码,但是我不能在项目A库中调试任何东西——我的断点被忽略了。我检查并确保调试符号是启用的,而不是剥离。我还缺什么吗?

Thanks

谢谢

1 个解决方案

#1


2  

You may want to enable a common build folder for all your projects. That way, the dsym files will be easy to find for the debugger.

您可能希望为所有项目启用公共构建文件夹。这样,调试器就很容易找到dsym文件。

Xcode->Preferences->Building->Customized Location

Xcode - >首选项- > - >自定义位置

#1


2  

You may want to enable a common build folder for all your projects. That way, the dsym files will be easy to find for the debugger.

您可能希望为所有项目启用公共构建文件夹。这样,调试器就很容易找到dsym文件。

Xcode->Preferences->Building->Customized Location

Xcode - >首选项- > - >自定义位置