Skip to content

Instantly share code, notes, and snippets.

@omsharp
Created February 24, 2024 13:31
Show Gist options
  • Save omsharp/16fce0936f3909e318aa271ab8a83f4a to your computer and use it in GitHub Desktop.
Save omsharp/16fce0936f3909e318aa271ab8a83f4a to your computer and use it in GitHub Desktop.
VSCode launch file for gcc. with two configs: one for build/run without debug, and the other for build/debug with gdb.
{
"configurations": [
{
"name": "Build/Run without debugging",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build/main.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"console": "integratedTerminal",
"preLaunchTask": "CMake_build",
},
{
"name": "Build/Debug with gdb",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/main.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\msys64\\ucrt64\\bin\\gdb.exe",
"preLaunchTask": "CMake_build",
"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