I can of course debug the Standalone app but debugging the AUv3 in a host used to work. I would choose the scheme MyPlugin_AUv3, edit the executable to “Ask on Launch” and I could choose AUM for example. Then start debugging, which would launch AUM, I’d insert the plugin and I could debug and would get logging.
Now Xcode tells me
“Direct installation of an App Extension is not supported.
Domain: com.apple.dt.CoreDeviceError
Code: 3002
Recovery Suggestion: To debug MyPlugin.appex use the App Extension scheme and set the exectable in the Run scheme action to ‘Ask on Launch’ or an application built by this project that will trigger the App Extension.”
But if I debug the Standalone scheme and choose “Ask on Launch” and then choose AUM, AUM will launch but when I insert the plugin Xcode does not attach. I.e. no breakpoints, no logging.
In the worst case you could temporarily add a sleep or a loop while Process::isRunningUnderDebugger() returns false, just after startup. It’s not perfect, but that should allow you to debug the majority of the startup sequence.
I also made this little hack in juce_SystemStats_mac.mm and got back logging:
void Logger::outputDebugString (const String& text)
{
#if JUCE_IOS
NSLog (@"%s", text.toRawUTF8());
#else
// Would prefer to use std::cerr here, but avoiding it for
// the moment, due to clang JIT linkage problems.
fputs (text.toRawUTF8(), stderr);
fputs ("\n", stderr);
fflush (stderr);
#endif
}
I’m having this problem as well on Xcode 26.2 and iOS 18.5, FWIW.
@phraemer could you please explain the process of launching the host and then attaching to the plugin process? I can’t seem to get anything going, no matter what I try in the AUv3 scheme. Any combination of executable and launch options seems to just instantly give me the error in your OP.
I have to start the plugin in a host, then in Xcode use Debug > Attach To Process > select the plugin process
Can’t seem to select a host to launch and then just add the plugin anymore, which would be necessary for debugging initialisation of the plugin in a host without resorting to tricks like adding a delay somewhere