I am programming in C in Visual Studio Code, but I can\'t compile, as VSC only offers three compilers built in - Node.js, C# Mono, and Extension development. After a little
A friendly reminder: The following tutorial is for Linux user instead of Windows
If you want to debug your c++ code with GDB
You can read this ( Debugging your code ) article from Visual Studio Code official website.
You need to set up task.json for compilation of your cpp file
or simply type in the following command in the command window
g++ -g file.cpp -o file.exe
to generate a debuggable .exe file
launch.json fileTo enable debugging, you will need to generate a launch.json file
follow the launch.json example or google others
this launch.json file will launch the configuration when you press the shortcut (Ctrl+F5)
Enjoy it!
ps. For those who want to set up tasks.json, you can read this from vscode official (-> TypeScript Hello World)