Xcode 15: Not able to attach system extension process to Instruments tool

Xcode Version 15.2 (15C500b)

After upgrading Xcode from 14 to 15.2 I am not able to attach system extension (packettunnel) process to Instruments tools for memory debugging. Same is working fine with Xcode 14. Error displayed: "Process No Longer Exists". But the service is running and is listed in process list.

% ps -ax | grep -i pkttunnel | grep -v grep
61910 ??         0:01.04 /Library/SystemExtensions/5F4AF6EF-****-****-****-F11****9CE78/com.******.client.*****-Client.***ui.***pkttunnel.systemextension/Contents/MacOS/com.******.client.*****-Client.***ui.***pkttunnel.systemextension

Note: I am able to attach a normal program to Instruments tool for memory debugging, I have noticed this issue with system extension processes only.

This seems like a bug, given that you can successfully analyze other process types and this process type worked before in Xcode 14. Did you try running Xcode 14 and Xcode 15 on the same host macOS or were you also using two different macOS versions?

Can you please file a bug report with more details? If you are able to attach a project with the system extension you are trying to debug, or a sample project with a very basic system extension, that will make it easier for us to reproduce the issue.

If you can post the Feedback ID here after filing it, this makes it easier for us to connect any discussion here with the information in the feedback report.

This issue was also present on MacOS Ventura, but on Ventura I had an option to revert back my Xcode to 14.x and I was still able to work on Instruments tool for debugging. But yesterday I upgraded my MacOS to Sonoma and I was unaware that Xcode 14 will not work on Sonoma. I was forced to upgrade my Xcode also to 15.2. Now I am stuck and I am not able to use this tool on Sonoma.

I have filled a bug in Apple's Feedback Assistant: FB13594413.

Please help me prioritising this bug with the relevant team.

If you are able to attach a project with the system extension you are trying to debug

This issue is also present with Apple 'SimpleFirewall' project. Below are the steps to reproduce:

  1. Download and compile Apple's SimpleFirewall project
  2. Before running the Apple is Xcode 15.2, attach 'com.example.apple-samplecode.SimpleFirewall********.SimpleFirewallExtension' in Xcode's 'Debug->Attach to process by Name'.
  3. Now run the SimpleFirewall App and allow to install Filter Extension.
  4. Above will install, start and attach the Filter Extension in 'Debug Navigator' in Xcode.
  5. Now for Filter Extension's memory, try to 'Profile in Instruments'. This action will fail with the error: 'Process No Longer Exists'.

Note: I have found a work around for this issue, if I attach the pid of system extension after starting the App at runtime, it allows me to 'Profile memory in Instruments '.

Xcode 15: Not able to attach system extension process to Instruments tool
 
 
Q