DAW not launching and console output not working in Xcode

Hi all,

I’m trying to write a sampler plugin with JUCE, and I have a bunch of DBG statements to help me test. However, even after editing the scheme to ask for an application to launch or open Logic Pro, first of all Xcode doesn’t ask me for an app to open for the former and Logic doesn’t even open for the latter, and second of all, nothing is outputted to the console if I try to attach Xcode to Logic in the Attach To Process menu. Any help regarding this? Thanks so much! Here is my current scheme:

Explicitly set the executable to your DAW (in my case, I use REAPER and it is great), don’t “Ask on Launch”, rather have XCode launch REAPER, and then wait for XCode to attach the debugger to the REAPER process - from that point on you should be able to access the plugin within REAPER’s address space.

This also works on Cubase and Logic, incidentally. Don’t forget that you have to point XCode at the actual executable file (e.g. /Applications/REAPER.app/Contents/MacOS/REAPER) and not just the .app bundle…

EDIT: If XCode isn’t “asking” you which program to launch on debugging, be sure you’re actually launching the Debug configuration …

Logic is quite difficult to debug for several reasons. On the newer Arm chips, plugins are all hosted out-of-process, which means that you need to attach to this hosting process instead of the main Logic app. There’s official Apple guidance on this topic here, but it requires disabling System Integrity Protection. I’d recommend exhausting all other options before resorting to this approach.

As @ibisum suggested, perhaps you could try debugging in a different DAW such as REAPER, which is much easier to debug. Although this won’t help you find bugs that only surface in Logic, it’ll still let you find more general issues in the plugin.

Ah, yeah Reaper worked. Thanks!