I’m dipping my toes into plugin development and it’s a blast. Actually ChatGPT is doing most of the heavy lifting between us, but we’re on our way and it’s fun. My part is to make mistakes so I’m trying to setup the debugger (VSCode + gdb).
I found a working launch.json to connect gdb to the rack process.
{
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "C:/Program Files/VCV/Rack2Pro/Rack.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [{ "name" : "PATH", "value" : "C:/Users/ds/Documents/Rack-SDK/dep/bin;C:/msys64/mingw64/bin;${env.PATH}" }],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:/msys64/mingw64/bin/gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}
],
"version": "2.0.0"
}
Editing plugin.mk
and commenting out $(STRIP) -s dist/$(SLUG)/$(TARGET)
as @Richie suggested was what finally made it work.
However, it does stop one some breakpoints but not all. On top of that, some variables when I hover over them or add them to the watch window return the message .
I edited the Makefile to disable optimization and include all debug information
CFLAGS += -O0 -g3
CXXFLAGS += -O0 -g3
but the problem remains.
Does anyone know how to fix this?
Thanks.