Hi,
I’ve finally setup debugger in VSCode programming a VST plugin in JUCE.
Here’s my actual tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "SETUP (Targets)",
"type": "shell",
"command": "cmake -B cmake-build",
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
"problemMatcher": []
},
{
"label": "BUILD",
"type": "shell",
"command": "cmake --build cmake-build",
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
"problemMatcher": []
}
]
}
and launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "DEBUG (gdb)",
"type": "cppdbg",
"request": "launch",
"program": "C:/vsthostx64/vsthost.exe",
"args": [
"-d",
"C:/Program Files/Common Files/VST3/MyPlugin.vst3/Contents/x86_64-win/MyPluginJuce.vst3"
],
"stopAtEntry": false,
"cwd": "C:/vsthostx64",
"externalConsole": false,
"avoidWindowsConsoleRedirection": true,
"internalConsoleOptions": "openOnSessionStart",
"MIMode": "gdb",
"miDebuggerPath": "C:/msys64/mingw64/bin/gdb.exe",
"miDebuggerArgs": "--silent --statistics",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Disable Thead logging",
"text": "set print thread-events off",
"ignoreFailures": true
}
],
"logging": {
"engineLogging": false,
"exceptions": true,
"trace": false,
"traceResponse": false,
"moduleLoad": false,
"programOutput": true
},
"preLaunchTask": "BUILD"
}
]
}
When I launch the script, it seems to build correctly, attach debugger and launch vsthost; when I load the plugin on vsthost, I see the gdb “working”, attaching the whole stuff, for example it outputs on the VSCode console:
=library-unloaded,id="C:\\Program Files\\Common Files\\VST3\\MyPluginJuce.vst3\\Contents\\x86_64-win\\MyPluginJuce.vst3",target-name="C:\\Program Files\\Common Files\\VST3\\MyPluginJuce.vst3\\Contents\\x86_64-win\\MyPluginJuce.vst3",host-name="C:\\Program Files\\Common Files\\VST3\\MyPluginJuce.vst3\\Contents\\x86_64-win\\MyPluginJuce.vst3",thread-group="i1"
But when I set a breakpoint on processBlock:
nothing stop/trigger it, and I basically can’t debug.
Where am I wrong?
Thanks for any suggestions.




