Debug Static Library-ZZ
From: xuyibo.net Date: 2008-01-18 03:36 PM
Duane Murphy wrote:
How can I source code debug my static library?
I have a static library built by xcode that is added to another project.
It is not a dependency so there is no sub-project building or
references, just a entry to the built libfoo.a file.
How can I set breakpoints and debug this static library while working in
the application?
Thanks for the information or references to appropriate documentation,
Hi Duane,
Assuming Xcode 2.3, I think you just need to:
1) Open the project that uses the static lib in Xcode
2) Open the static lib project in Xcode. Set breakpoints where you need them.
3) Go back to the first project and open the breakpoints window.
4) Expand the 'Project Breakpoints' category and make sure that the checkbox for the static library project is checked.
5) Debug the app. You should hit breakpoints in your library.
If you're using an earlier version, then if you have both projects open, the breakpoints from the static lib project should be hit when you debug the app that uses it.
- Rush