Debugging help with CBL iOS

I’m trying to debug an issue with CBL on iOS (https://github.com/couchbase/sync_gateway/issues/1665). Is it possible to attach the source files CBL to my app’s xCode project so I can step into the couchbase code in the debugger?

You’ll need the .dSYM file for the framework (which I think we provide?)

That file contains absolute paths to the source files, and by default the debugger will look for them at those paths, which are basically wherever the source code happened to be on the build server that generated the release.

I believe you can tell lldb to use a different base directory instead, but that goes beyond my very limited knowledge of it. I’m sure there’s info available online, though.

The other possibility is to build the framework yourself. Then the .dSYM file will point to the source files on your disk.

Thanks Jens,

So jut for anyone reading this…

To build CBL locally, follow these instructions instructions.

Then adjust the xocde project to generate the dSYM file (instructions here). I had to do a clean and build to get the file to generate.

The file appears in /Users/<...>/Library/Developer/Xcode/DerivedData/CouchbaseLite-<some-crazy-id>/Build/Products/Debug-iOS-universal/CouchbaseLite.framework.dSYM (best use find command to locate it, e.g.: find ~/Library/Developer/Xcode/DerivedData/ -name *dSYM

Not sure what to do next though - how do I tell my project about the dSYM file?