Używam Visual Studio Code, tak wygląda mój launch.json:
{
// 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": "g++ - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [
"-g",
"-o",
"main",
"main.cpp",
"-Wall",
"-static",
"-Wextra",
"-Wshadow",
"-Wconversion",
"-O3",
"-Wunreachable-code",
"-Wswitch-default"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++ build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
]
}
Po kompilacji pokazuje tylko problemy które uniemożliwiają skompilowanie programu, ale nigdzie nie potrafię znaleźć Warnings, lub opcji pokazujące je, proszę o pomoc :)