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
}