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-projec开发者_JS百科ts 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?
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.
精彩评论