Closed oridong closed 1 year ago
Are you using the provided dockerfile or did you roll your own?
I think you have 2 options here:
launch.json
// Example gdb launch of a ros executable
{
"name": "(gdb) Launch (merge-install)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/install/lib/${input:package}/${input:program}",
"args": [],
"preLaunchTask": "source",
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
tasks.json
{
"label": "source",
"detail": "Source the directory",
"type": "shell",
"command": "source install/setup.bash", // path to your setup.bash file
"problemMatcher": []
}
how to source setup.bash before press F5 launch launch.json ? the shell where gdb running must has the foxy environment variables, otherwise