Is there any way to debug plugin in Logic Pro on Apple M1?

Hello,
my Logic Pro crushes immediately after I launch my plugin. There is no problems in any other DAW, so I need to debug my plugin in Logic Pro, but in xCode my break points are “grayed” out and there is info:
“xCode won’t pause at this breakpoint because it has not been resolved…”

There are also some suggestions but they look like it’s not my case.

I am on Apple M1. Sometime ago with my old Macbook there was not such problem, but now I have no idea how to debug it from Logic?

For any help great thanks in advance.

Best regards

Not sure there is any better way for now.

Try this on Xcode:
Debug->Attach to process by PID or name
set AUHostingServiceXPC_arrow as value

Might not work. Getting M1 to enter debug mode is a pain for some reason.

1 Like

Unfortunately it doesn’t help in my case. But what is strange, that now I remember sometime ago I had the same problem and then it worked, but not now.

I tried that and it also doesn’t work. But to be honest I didn’t set AUHostingServiceXPC_arrow as value while I have no idea what is this, and how or where to set it?

If you tried to expand Attach To Process menu you won’t see it there.

Select Debug->Attach to process by PID or name and you’ll get a popup. Paste AUHostingServiceXPC_arrow in the textbox named Pid Or Process Name.

Aaaa… Ok, stupid me. In field “PID or Process Name” I just wrote “Logic Pro”.
But you mean to use AUHostingServiceXPC_arrow inside that field. Ok I just didn’t undarstand .

Now it works. Great thanks.

FYI: this is also affects the Apple Silicon build of Ableton Live (11.1) now.

That’s not working for me. When not using Rosetta, Logic tells me “An Audio Unit reported a problem which might cause the system to become unstable. Please quit and restart Logic Pro.” This happens with Debug builds as well as copy-protected Release builds.

I tried setting a breakpoint in the wrapper constructor, in my Processor constructor, and in the createPluginFilter() function, but it never hits any of those breakpoints. I tried using Attach to Process, with no luck. Then I tried using this Attach to process by Pid or Process name, passing that name, prior to instantiating the plugin in Logic. It tells me it’s waiting for the process to start. So when I launch the plugin then, the same thing happens. I get that error dialog, with none of my breakpoints ever hit. After clicking Quit, Xcode says that that process finished running, so it appears to have started when the plugin was instantiated, but still no breakpoints were hit.

The weird thing is, the plugin scans fine using auval or using Logic’s Plugin Manager, and it runs fine in Studio One. But in Logic, I have to turn on Rosetta to get it to load. How do I even investigate this now???

@eyalamir perhaps you can work some of your black magic or share some advise on this issue?

Ok, so I still have to disable SIP, even when using that method to attach. I’m able to debug now. But I have a bug that doesn’t seem related to my code at all. I’ll make a separate post for that.

Almost everything is fine with your solution, but the only problem is logging with Juce DBG() doesn’t work which is very annoying.

I’ve tried to select “Enable Logging (Live Allocations)” inside window Attach to process by PID. But it doesn’t help.

Try building for both Rosetta and native M1 from xcode (and you’ll need Logic for M1 and Rosetta as well).
Also try loading in different hosts.
This will give you a clue about who’s to blame here.