Hi Kraku, I use Projucer, VS Code and Linux and the way I have it working is by setting up ‘.vscode/tasks.json’ to do the build and a ‘.vscode/launch.json’ to run the debugger.
tasks.json:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "make",
"type": "shell",
"command": "cd ${workspaceFolder}/Builds/LinuxMakefile && make -j 6 CONFIG=Debug",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Make and debug in plugin host",
"type": "cppdbg",
"request": "launch",
"program": "<PATH_TO_JUCE_HERE>/extras/AudioPluginHost/Builds/LinuxMakefile/build/AudioPluginHost",
"args": [
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "make",
"miDebuggerPath": "/usr/bin/gdb"
}
]
}
In the above config, you will need to put your JUCE path in and already have the Audio Plugin Host built to use it.
You can set up tasks to do whatever you want, which are then called by the ‘launch’ configuration. For example, you can have task just to run the unit tests, or to build with different flags, etc.
The configs then can debug in any way you want - I have one for debugging in Audio Plugin Host (which loads quite quickly) and one for debugging in Reaper (for when I need to test more advanced features).
Hope that helps!