Skip to content

Instantly share code, notes, and snippets.

@trhgquan
Created March 7, 2022 18:30
Show Gist options
  • Save trhgquan/da7b134cef32bb7e097e20553fdad443 to your computer and use it in GitHub Desktop.
Save trhgquan/da7b134cef32bb7e097e20553fdad443 to your computer and use it in GitHub Desktop.
Launch gdb debugger inside VSCode, open a new console window for interactive sessions.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/main.exe",
"args": [],
"stopAtEntry": true,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment