You need to build a System preference panel extension for your app but you’re unable to debug it from XCode due to Apple System Integrity lock?
Let’s see how!
![](https://i0.wp.com/www.albertopasca.it/whiletrue/wp-content/uploads/2019/07/Schermata-2019-07-24-alle-12.25.02-1024x690.png?resize=1024%2C690&ssl=1)
But how to debug this extension?
Latest macOS block the execution or the debug of all system application. Now all apps are signed and if you try to attach a debugger you’ll receive this error:
Message from debugger: cannot attach to process due to System Integrity Protection
To avoid this kind of error, I suggest a simple trick. Use it only for debugging your plugin.
- Go in /Applications and duplicate the “System Preferences.app”.
- Rename it to “SystemPreferences_nosign.app”
- Open terminal, go to the Application folder and use:
$ codesign -s - -f SystemPreferences_nosign.app
Well done!
Now in XCode, select as Run Process, your new “nosigned” application. Build and run (debug)!