Ctrl+P and Type "ext install cpptools" it will install everything you need to debug c and c++.
Debugging in VS code is very complete, but if you just need to compile and run: https://code.visualstudio.com/docs/languages/cpp
Look in the debugging section and it will explain everything