Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docs for setupCommands in vscode cppdbg launch json

In my vscode cppdbg launch configuration, I am using setupCommands like

"setupCommands": [
    {
        "description": "Enable pretty-printing for gdb",
        "text": "-enable-pretty-printing",
        "ignoreFailures": true
    }
]

I would like to add additional gdb setup commands like

set print repeats 0
set print elements 0

into my launch configuration

Where can I find some documentation about this?

like image 476
mkkm Avatar asked Apr 15 '26 17:04

mkkm


1 Answers

I cannot find detailed documentation too, but here it is how I see solution

You can modify launch.json like this

"setupCommands": [
    {
       "description": "Enable pretty-printing for gdb",
       "text": "-enable-pretty-printing",
       "ignoreFailures": true
    },
    {
       "text": "set print elements 0"
    }
],

Or you can use vscode debug console to interact with gdb. See example below:

enter image description here

like image 121
Alexander Slesarev Avatar answered Apr 18 '26 14:04

Alexander Slesarev