Created
October 17, 2023 12:57
-
-
Save btgoodwin/306786c0f6eed9b086136cd4111931d3 to your computer and use it in GitHub Desktop.
VSCode GDB Launch Settings for GStreamer's "gcheck" test framework
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"configurations": [ | |
{ | |
"name": "Debug GCheck Test", | |
"type": "cppdbg", | |
"request": "launch", | |
"program": "${workspaceFolder}/path/to/executable", | |
"args": [], | |
"stopAtEntry": true, | |
"cwd": "${workspaceFolder}", | |
"environment": [], | |
"externalConsole": false, | |
"setupCommands": [ | |
{ | |
"description": "Enable pretty-printing for gdb", | |
"text": "-enable-pretty-printing", | |
"ignoreFailures": true | |
}, | |
{ | |
"description": "Enable randomization for gdb", | |
"text": "-enable-randomization", | |
"ignoreFailures": true | |
}, | |
{ | |
"description": "GDB stays attached to both processes on fork for gdb", | |
"text": "-gdb-set detach-on-fork off", | |
"ignoreFailures": true | |
}, | |
{ | |
"description": "Follow child on fork for gdb", | |
"text": "-gdb-set follow-fork-mode child", | |
"ignoreFailures": true | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The first two
setupCommands
are typical things. The second two though are necessary to keep thegdb
instance attached to the unit under test. Additionally,stopAtEntry: true
is often required for a breakpoint within a test to actually be registered across the reattachment behavior. If you find that runningfalse
there works for you, then perhaps they fixed this.