I have a Xcode project that is building a library and I want to be able to debug the library when it is loaded by the main application.
Run
and Debug
opti开发者_C百科ons from Run menu are disabled and if i try to use attach to process option I get "No launchable executable present at path"
. When looking at Active Executable I see but I don't know how to tell xcode what to run/debug.
So how should I debug the application? I'm looking for something similar to the project configuration of Visual Studio but I wasn't able to locate this option yet.
Add a custom executable to your project.
It is under the Project -> New Custom Executable... menu item.
From there, you can add your application as the custom executable and that will give you the ability to debug the application and the plug-in.
One additional helpful hint; in Xcode's build preferences set up a single common products directory. This will put the symbol files for building your application in the same directory as your application (assuming your main application is one you build) and, thus, you'll be able to step through frames in both your library and your application.
For those using Xcode 4:
Project > Scheme > Edit Scheme...
Select the Run phase > Info
And set an Executable
精彩评论