Created
October 10, 2013 20:23
-
-
Save kaloprominat/6924952 to your computer and use it in GitHub Desktop.
macos: xcode preference pane debug settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Debug a Preference Pane with Xcode 4 | |
Jun 13, 2011 | |
Some time ago I did a post to show how to debug a Preference Pane with Xcode, but the tip was for Xcode 3, and now with Xcode 4 it has changed a bit. | |
But yesterday Scott Lahteine posted a comment to explain how to do it, so here is the new method for Xcode 4. | |
• In the product menu choose Edit Scheme... | |
• Go to the Run section and in the Executable field choose System Preferences.app | |
Now we need to edit some build settings for the debug configuration : | |
• Deployment Location (DEPLOYMENT_LOCATION) : Yes | |
• Installation Build Products Location (DSTROOT) : / | |
• Installation Directory (INSTALL_PATH) : $(USER_LIBRARY_DIR)/PreferencePanes | |
And we are done, you can again debug your pref pane with Xcode ;) | |
Thanks again to Scott Lahteine for the tip ! | |
EDIT | |
As Justin Mecham mentioned : | |
If you wish to automatically load the prefPane bundle that you just built, you can add ~/Library/PreferencePanes/YourPreferencePane.prefPane as a launch argument within the scheme editor. Since it’s already installed, it will simply load that pane instead of prompting you to install it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
well yeah, since preference panes are run under system process, it's not possible to attach to it while SIP is being turned on =(
need to enable SIP without debug restrictions, i guess
csrutil enable --without debug
upd: only complete
cstutil disable
worked for me