Forget the endless jsons, compile directly in the terminal first. Once you figure that out, learn how to run the same compilation command from VSC. (Hint: you're misusing
launch.json
. That's for when you already have a compiled executable and want to debug it, so useless for you now; and in there "program": ...
is a path to your compiled program, not g++
, and "miDebuggerPath": ...
is a path to the debugger (to gdb.exe
I think?).