But once Projucer creates the code and initial project, I click the “play” button in Xcode, the build succeeds, and … I’m not sure what I’m supposed to do next.
Questions
Shouldn’t I be able to “run” the plugin from Xcode and see the plugin window pop up?
Shouldn’t “building” the plugin cause a .vst or .vst3 file to get created in /Library/Audio/Plug-ins/ ? I looked and no file gets created there. Scanning with AudioPluginHost.jucer (out of process) doesn’t find anything either.
The only place I can find a .vst3 file being created is in <project-folder>/Builds/MacOSX/build/Debug/TutorialVSTTryTwo.component/TutorialVSTTryTwo.vst3, but the file is an “alias” (probably means a soft-link?). Image attached.
You can’t “run” a plugin by itself. You need to run it inside a DAW that is attached as a process.
The easiest thing to use is the JUCE AudioPluginHost in the JUCE Extras folder. Compile it, then choose the executable in the Scheme’s Run > Executable (this is an older version of XCode:
Then, it launches the APH when you run the debugger, and you can select and instantiate your plugin and debug it.
(Or, you can attach to a real DAW like Reaper or Logic and debug it in there…)
Yes, the .vst file you located is indeed an alias, and it should resolve to the Plugins folder. In the Finder, control-click and choose “show original”.
find the .vst3 as you suggested, then add to APH to the flow editing window
Edit the Scheme with Product > Edit Scheme, and set executable
Set a breakpoint and hit Run to Debug
But when this happens, all I see is the LLDB shell in the bottom of Xcode plus the variable values. This is super helpful for the code! I also hear my own typing echoing through the plugin to my laptop speakers.
But I don’t see the UI. Should I be seeing the plugin UI?
So all this does seem clear, but what I’m still confused about is how this lets me debug?
Here’s a screenshot. I am clicking “Run” with the play button in Xcode, but a couple of confusing things:
With my breakpoint, why don’t I see the variable “a=1” in the debugger pane?
Why does my DEBUG() message print twice instead of just once? I understand that there are two channels, but shouldn’t my breakpoint stop execution during the first iteration on the first channel?
Down at the bottom left of the section that shows your variables values, you will see the word “auto”. This means it is automatically only showing variables that are being used (at the point you’re at). Since ‘a’ is not being used, you don’t see it. Change this to ‘local’ or “all” and ‘a’ should show up.
Regarding the double DBG: that’s puzzling, you are in a loop but as you say I would think it should only print once and stop during the first iteration.
Anyway, I think this probably deserves it’s own topic so I’ll start another. Y’all have at least gotten me started with running the project which was the original goal!
The JUCE community is so nice and helpful. I’m blown away. Thanks !!