Repository navigation
Debugging in VS Code
Lewis McClelland edited this page Oct 11, 2026
·
1 revision
This chapter will provide an example configuration for debugging PROS programs from VS Code.
Start by installing the Microsoft C/C++ extension. Then add the following to .vscode/tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "v5gdb server",
"type": "process",
"command": "v5gdb",
"args": ["--tcp=127.0.0.1:3333"],
"isBackground": true,
"presentation": {
"panel": "dedicated",
"clear": false
},
"problemMatcher": {
"owner": "v5gdb",
"pattern": { "regexp": "^\\b$" },
"background": {
"activeOnStart": true,
"beginsPattern": "^",
"endsPattern": "Listening on "
}
}
}
]
}Create the following launch configuration in .vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to V5 (v5gdb)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/bin/hot.package.elf",
"cwd": "${workspaceFolder}",
"MIMode": "gdb",
"miDebuggerServerAddress": "127.0.0.1:3333",
"stopAtConnect": true,
"preLaunchTask": "v5gdb server",
"setupCommands": [
{ "text": "-enable-pretty-printing", "ignoreFailures": true },
{ "text": "add-symbol-file ${workspaceFolder}/bin/cold.package.elf", "ignoreFailures": true }
]
}
]
}Start the program as normal, then press F5 to start debugging it.