Skip to content

Instantly share code, notes, and snippets.

@adilyas
Created February 4, 2025 10:23
Show Gist options
  • Save adilyas/539df46fb34bdb796b0c0e23baea51a2 to your computer and use it in GitHub Desktop.
Save adilyas/539df46fb34bdb796b0c0e23baea51a2 to your computer and use it in GitHub Desktop.
tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "g++",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": ["$gcc"],
"detail": "Generated task by G++"
}
]
}
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "C++ Debug",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build",
"internalConsoleOptions": "neverOpen"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment