Debugging plugin using vscode
Docker and ptrace
GDB
don't forget to install gdb
| devcontainer.json |
|---|
| {
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt=seccomp=unconfined"
]
}
|
OR
| docker-compose |
|---|
| services:
gazebo:
build:
dockerfile: .devcontainer/Dockerfile
context: .
cap_add:
- SYS_PTRACE
security_opt:
- seccomp=unconfined
|
VScode
| {
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "attach",
"program": "/usr/bin/ruby3.0",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
}
]
}
|
TODO: explain how i get /usr/bin/ruby3.0
Reference