I am developing an NE based System Extension on macOS Catalina 10.15.7 using Xcode 12.4. I have everything in place and my extension is running fine. However, I am not able to attach debugger to my extension from Xcode. I can go to terminal and as root user, I am able to attach lldb to the running system extension. But I am not able to attach the debugger from Xcode using Debug - Attach to Process by PID or Name - Debug Process As - root. Xcode just keeps on Waiting to Attach. If the extension is already running, then I am able to attach by PID but never by name. I would like to be able to start debugger using process name and launch the extension and be able to debug from first line of code in extension.
Also, I really like Xcode's contextual debugging where I can see most of the variables and information without any extra effort. With terminal the debugging is comparatively hectic.
So, is there any way I can attach to System Extensions by name in Xcode? I have tried using target name as well as extension bundle identifier and several other combinations. From terminal I can attach using bundle identifier of the extension itself.
Post
Replies
Boosts
Views
Activity
I am pretty new to macOS development with background in iOS development. I am trying to create a Network Extension based VPN in macOS. When I try to add new target, I see Network Extension as part of App Extensions as well as System Extensions. When I add the Network Extension target from different categories, I see different build settings for both of them. This confuses me specially because in iOS, there is only App Extensions. So, what's the difference between the two Network Extension options in macOS? How do they differ in functionality?