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!
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
A crash (or system crash) in computing is an event in which a computer or a program (such as a software application or an operating system) ceases to function properly, often exiting after encountering errors. The program responsible may appear to freeze or hang until a crash reporting service documents details of the crash. If the program is a critical part of the operating system kernel, the entire computer may crash, often resulting in a fatal system error. […]