Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug a bundle in XCode?

I wrote a nice little program. At some point, it is required to load a bundle with some additional functionality. I, too, am the author of the bundle, so I have the source code and Xcode-projects for both the main application and the bundle.

Until now, I simply dragged the bundle into the resources-folder in the main application, which works fine for running it, but I can't debug it (and of course there is an error in it).

Is there a way to set up Xcode so that I can debug the bundle?

like image 620
bastibe Avatar asked Apr 07 '10 20:04

bastibe


1 Answers

In your bundle project, you should add a custom executable. That executable will launch in the debugger when you do a Build & Debug.

To do this in Xcode 3, right-click on the Executables section in the Groups and Files list in your project and choose Add > New Custom Executable…

You can then select your application in the open dialog.

In Xcode 4, you need to go to Product > Manage Schemes, select your Debug scheme and in the Info tab for the Debug action you should use the Executable popup to choose a custom executable.

You will also need to change your build settings for your Debug scheme so that the build products are placed in your application's plug-ins folder when the plug-in is built, so that when you Build & Debug the application contains the latest version of your bundle.

like image 157
Rob Keniger Avatar answered Nov 15 '22 20:11

Rob Keniger