mattjgalloway
mattjgalloway

Reputation: 34912

iOS framework project breakpoints not working

I've created an iOS framework project using the famous (and excellent) iOS Universal Framework Xcode template.

But now I've encountered an annoying problem that I can't seem to fix which is that I have an iOS application project that references the framework project and when I run that and have breakpoints set in the framework they don't get it. It seems GDB doesn't have the debug symbols for the framework.

I've made sure that debug symbols are not stripped from the framework and the type is set to "DWARF with dSYM file".

Anyone have any ideas what might be wrong and how to fix it?

My setup:

Upvotes: 12

Views: 4575

Answers (3)

ram kumar
ram kumar

Reputation: 59

I ran into this issue while linking a dynamic framework to a test application in Xcode 7. I was able to avoid the error by ensuring the following in the build settings of my dynamic framework:

"Generate Debug Symbol" - 'Yes'

"Strip Debug Symbols During Copy" - 'No'

Upvotes: 5

Krejko
Krejko

Reputation: 931

I have also experienced this issue. One way that I have been able to work around this by merging both projects into a single workspace.

Instructions on how to do this can be found at http://developer.apple.com/library/ios/#recipes/xcode_help-structure_navigator/articles/adding_a_project_to_a_workspace.html.

NOTE: I have also experienced a bug adding projects to workspaces where there appears to be no files in the recently added project to the workspace. I have found this is easily remedied by restarting Xcode after all of the projects have been added to the workspace.

Upvotes: 0

Diesel Heart
Diesel Heart

Reputation: 325

Several things comes to my mind regarding your problem. Give them a try and see which ones work for you:

  1. Make sure to have the "Other Linker Flags" on the "Linking" section of the framework's "Build" Info.
  2. Make sure that you have the framework's built in the correct configuration (ie, if you compiled the framework's in Release and are using it with your project set to Debug you might get issues)
  3. Make sure you added the correct framework .a file to your project (actually two issues here: you can have added the Release version - so no debug symbols in there - AND you have to make sure that your projec is not pointing to some old build version)
  4. Check that both the framework's and your project have the "Level of Debug Symbols" on the "Code Generation" section of the "Build" Info set to "All Symbols [full, -gstabs+ -fno-eliminate-unused-debug-symbols]"
  5. If all alse fails try to empty the XCode caches and remove the framework reference from your project. Then clean and rebuild the framework (all configs: device-debug, device-release, simulator-debug, simulator-release, ...) and add it again to you project. Clean and rebuild your project and cross your fingers... :-)

Upvotes: 0

Related Questions