Trouble debugging VST in FL Studio

Hi,

I am just beginning my Juce journey so I apologise if I’m going about this all wrong, but I’ve read almost every discussion on this and I can’t figure it out.

I am building an audio plugin that I’ve created using Projucer, saved and opened in Visual Studio 2022 (I’m on Windows 11). I can Debug and the standalone runs fine, it shows the usual Hello World.

To start building my idea, I need to be able to debug in a DAW so I can feed audio in, and I would very much prefer for that DAW to be FL Studio (21 to be precise). I have tried setting the Debug Command to …/FL64.exe, and I have scanned for plugins pointing at where my .dll file is in the Debug build for my project. My plugin is in my plugins list in FL Studio, and I can click to open it, but it says:

“There was a problem opening the plugin TestPlugin for an unknown reason. Please make sure it was installed correctly.”

I have tried using the .vst file instead, I’ve tried building the Release version and using that instead, I’ve tried Attaching to the FL64 process instead, all yield the same result. I know it must be possible. I know FL uses Fruity Wrapper but that doesn’t appear as a process so I can’t Attach to that instead.

Please advise!
Thank you,
Jaime.

I figured it out. Not sure if I should delete the post or post what I learned for future strugglers:

I was adding my Build folder as an extra folder to search for VSTs in the Plugin Manager in FL. Apparently, you can’t do that with VST3. All VST3s have to be in one folder. I used Projucer to make a copy of the VST3 in my VST3 folder and I set the debug command to FL64 and set Attach to Yes.
Now, I open FL, start debugging in VS, open the plugin in FL and voila.

You can make that step simpler and more robust by not attaching later into the host. You can rather start the whole host under the debugger by using the host as the debugging command and setting the VST3 project in Visual Studio as the “start up project”. Then you can use “Debug->Start debugging” or the shortcut F5 to start both the debugger and the host at the same time. This can also catch problems that may happen when the plugin is scanned by the host much more easily than by doing the attach to process thing.

That’s true but FL takes a few seconds to start up, and closing it out each time is a bit tedious.
But instead, my debugging command attaches to FL so I do just use F5 to start debugging, then go into FL and open the VST.

You’ve probably already done similar, but for future internet visitors:

Edit: Err, well for VScode users anyway. You said Visual Studio :slight_smile:

launch.json

        {
            "name": "Windows::Debug::vst-all ALL (FL Studio)",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "C:/Program Files (x86)/Image-Line/FL Studio 20/FL64.exe",
            "args": [
                "C:/Aaron/Projects/GitHub/APU/test/FLStudio Test Project/FLStudio Test Project.flp"
            ],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "console": "integratedTerminal",
            "preLaunchTask": "Windows::Debug::VST3 Install Loudness Compressor"
        },

task.json

        {
            "label": "Windows::Debug::VST3 Install Loudness Compressor",
            "type": "shell",
            "command": "copy",
            "args": [
                "-Force",
                "-Recurse",
                "${workspaceFolder}\\plugins\\LoudnessCompressor\\Builds\\VisualStudio2019\\x64\\Debug\\VST3\\*.vst3",
                "C:\\Program Files\\Common Files\\VST3\\"
            ],
            "group": "build",
            "dependsOn": [
                "Windows::Debug::VST3 Build Loudness Compressor"
            ],
            "problemMatcher": []
        },