Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to debug .framework source from main project?

Tags:

xcode

ios

i have a sub project in my main project using xcode 4.5.2 . the sub project produces .framework library. the sub project is embbeded in main project. i have also defined the project header where to look for sub project header(framework header). the sub project build target is set for debug. but still i cannot step in break point in the sub project. i found something but its from 2006 when xcode was different. and i cannot figure it out. http://www.idevgames.com/forums/thread-3985.html

does anyone know how to configure xcode in order to use it for debugging the .framwork library?

thanks in advance!

like image 775
Hashmat Khalil Avatar asked Jan 14 '23 19:01

Hashmat Khalil


1 Answers

There is actually a way to debug the an iOS project that uses a .framework, if you have the source code. This worked for me in xcode 4.6.

You can do in the following way:

  1. Insert breakpoints in your .framework's source code.
  2. Compile the project that uses the framework and run it on your device (iPhone, iPad, etc.). This step is just to make sure you have the most updated project installed on your device.
  3. Stop the process running on your device and go to xcode -> product -> Attach to process -> YourApp. In xcode 6, "Attach to Process" is under the Debug menu.

If you don't see your app's name in the applications listed there, go to "By process Identifier (PID) or Name..." and enter the app's name. Now, if you'll run the application in your device, it should break in the breakpoints that are enabled.

like image 144
resurrecteds Avatar answered Jan 20 '23 03:01

resurrecteds