Not exactly an SDK question, but I’m trying to debug an audio problem in my VST3 plug-in, and need to do it without stopping processing so long that it causes the host to stop processing. I’ve got a lot of old logging statements in my code that I can turn on, which write to stderr, but I can’t seem to find where they are viewable on my system. They don’t show up in Xcode when debugging (attached to the host), and don’t show up in any console log that I’ve found so far. I know I used them in the past in older OS versions, but if there was a trick to it, I can’t for the life of me remember what it was. How can I view stderr output from a plug-in under Xcode 8.2 or via the OS X 10.12 Console?
I don’t have any problems with fprintf(stderr,…) on XCode with VST3 clients, however Pro Tools will prevent stderr and stdout from appearing (which sounds like what you may be experiencing). I got a great tip from a friend at SoundToys who uses Terminal for all logging. You start the client from the command prompt, then fprintf() will go there. For Cubase Elements 8 that would be:
arch -x86_64 /Applications/Cubase\ LE\ AI\ Elements\ 8.app/Contents/MacOS/Cubase\ LE\ AI\ Elements\ 8
Next attach to the process in XCode.
Then you should be able to see your data-logs in Terminal, bypassing XCode altogether. Hope that helps (and sorry if you already tried/knew that…)!
Ah, that does it! Thanks! (I’d seen that solution elsewhere, but didn’t think it would apply to getting stderr output from a plug-in. I guess that if it works for the host, it works for the plug-ins the host loads.