Skip to content

Instantly share code, notes, and snippets.

@nezvers
Created February 19, 2026 07:15
Show Gist options
  • Select an option

  • Save nezvers/39737d68ea7a002040f52248fd75fae3 to your computer and use it in GitHub Desktop.

Select an option

Save nezvers/39737d68ea7a002040f52248fd75fae3 to your computer and use it in GitHub Desktop.
VScode GCC
{
// 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) debug",
"type": "cppdbg",
"request": "launch",
"windows": {
"program": "${workspaceFolder}/${config:PROJECT_NAME}.exe"
},
"linux": {
"program": "${workspaceFolder}/${config:PROJECT_NAME}"
},
"args": [],//, "-platform", "web"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "Build debug"
}
]
}
{
"PROJECT_NAME": "main",
"COMPILER": "gcc"
}
{
"version": "2.0.0",
"tasks": [
{
"label": "delete build",
"type": "shell",
"windows": {
"command": "if exist .\\${config:PROJECT_NAME}.exe del /F /Q .\\${config:PROJECT_NAME}.exe",
"options": {
"shell": {
"executable": "cmd.exe",
"args": ["/C"]
}
}
},
"linux": {
"command": "rm -f ./${config:PROJECT_NAME}",
"options": {
"shell": {
"executable": "/bin/bash",
"args": ["-c"]
}
}
},
"group": "build",
"problemMatcher": [],
"detail": "Clear previous build"
},
{
"label": "Build",
"type": "shell",
"command": "${config:COMPILER}",
"args": ["src/main.c", "-o", "${config:PROJECT_NAME}"],
"group": "build",
"problemMatcher": [],
"detail": "Build"
},
{
"label": "Build debug",
"type": "shell",
"command": "${config:COMPILER}",
"args": ["src/main.c", "-o", "${config:PROJECT_NAME}", "-g"],
"group": "build",
"problemMatcher": [],
"detail": "(gdb) Build"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment