How to Debug AudioUnits on bigSur with Logic Pro X

Hello

Since upgrading to bigSur via M1 MacBook Pro I'm unable to attach the debugger in Xcode to Logic Pro X (v10.6.1).

Previously this worked fine on an Intel machine with Catalina.

I've also tried attaching the debugger manually to AUHostingServiceXPC_arrow but that reports an unable to attach error.

Could not attach to pid : “27333”

"attach failed (Not allowed to attach to process.  Look in the console messages (Console.app), near the debugserver entries when the attached failed.  The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.)"

I can't see anything in the Console.app about this.

Any ideas?



Update: I've managed to get breakpoints working in Logic X by disabling SIP and attaching the debugger to AUHostingServiceXPC_arrow.

This isn't ideal. Any ideas on why disabling SIP would allow Xcode to attach the debugger but otherwise fail?
I’m not sure of the specific details of Logic and Audio Units but the fact that SIP enables more debugging is not strange. Modern versions of macOS have various facilities to prevent debuggers from attaching. For example:
  • You can’t, in general, attach to a system process.

  • Third-party processes can prevent the debugger from attaching by enabling the hardened runtime.

  • And then opt back in to debugging via the com.apple.security.get-task-allow entitlement (see the Avoid the Get-Task-Allow Entitlement section of Resolving Common Notarization Issues).

Disabling SIP disables some of these protections, and clearly that was sufficient for your needs. Yay!

Finally, my standard warning about disabling SIP: Do not disable SIP on a machine you care about. I recommend that you do this sort of malarkey in a VM. If you can’t do that in your case, use a ‘victim’ machine. If you can’t do either of those, and thus have to disable SIP on your main machine, re-enable it as soon as you’re done.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
It would be nice if Apple would help developers by adding the get-task-allow.

SIP disabling seems like tempering system where attaching for debugging a plug-in dynamic library is a legit reason.

For third party apps we can resign the hosting service. But for system private services we cannot resign.

It would be nice if Apple would help developers …

Agreed. To get this suggestion in front of the folks who have the power to enact change, put it in a bug report. Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Bug report submitted:
FB9027211 (Xcode Debugger can't Attach to Logic Pro X (Without disabling SIP))
Here is my bug report:
FB9017285

Would be really nice if Apple could address this.

Just as a reminder, Chrome did have some issue that affected machines with SIP disabled...
I hate to sound like a total bozo but for those of us NOT in the know (but would like to be!) what is 'SIP'? Could not find a reference.

Thanx for your patience,
jOhn

for those of us NOT in the know … what is 'SIP'?

Sorry about the unexplained jargon. SIP stands for System Integrity Protection. See:
Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
How to Debug AudioUnits on bigSur with Logic Pro X
 
 
Q