I added an XPC Service to my project and I would like to set breakpoints and inspect variable contents in the debug area in XCode. Breakpoints that I set in the service's code are not recognized (obviously, the debugger is attached to the main apps process. How and I attach the debugger (manually or automatically) to the XPC Service process after my main app launches it? Is there some way to run the service alone and send it messages without it being launched from the main app?
相关问题
- Apple PrefPane example fails to build with clang e
- XCode 4.2 clang seg fault
- How do I change the compiler in Xcode
- How do I add OpenGL Mathematics (GLM) to Xcode 4?
- How do you link a C++ static library to a C progra
相关文章
- Generate code for core data attributes in xcode 4
- UITableViewController Background Image
- Can't Rename Files In Xcode 4 Anymore?
- How do I navigate through a method call hierarchy
- can't find info.plist in xcode 4
- What should I do about xcuserdata directories with
- reloadData in MasterView from DetailView
- How to debug “Xcode CodeSign error: The entitlemen
I am actually not sure how to attach the debugger. But you can still use "NSLog" for debug output on the console. Then start the "Console.app" in "/Applications/Utilities/Concole.app". Depending on your system language this app may have a different name (it's localized). It shows ALL NSLog outputs from all Applications which are running including your xpc-services.
It's not the debugger, but you will get informations out of your service.
Debug -> Attach To Process -> By Process Identifier (PID) or Name...
Type in your XPC service process name. The next time launchd starts up your XPC service, Xcode will attach.