Skip to content

Instantly share code, notes, and snippets.

@torumakabe
Last active March 11, 2019 07:08
Show Gist options
  • Save torumakabe/9fd91d4478d83612c6d7cc68b5d44a3e to your computer and use it in GitHub Desktop.
Save torumakabe/9fd91d4478d83612c6d7cc68b5d44a3e to your computer and use it in GitHub Desktop.
VS Code C Debugger Configuration (Windows)
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/a.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "C:/ProgramData/chocolatey/bin/gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
// task.json
{
"version": "2.0.0",
"tasks": [
{
"label": "Debug Build",
"type": "process",
"command": "gcc",
"args": [
"-g",
"-O0",
"${workspaceFolder}/a.c",
"-o${workspaceFolder}/a.exe"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": "$gcc"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment