Look at these links. They might help.
-
Probably for your issue:
Configure launch.json for C/C++ debugging in Visual Studio Code -
Complete setup of VS Code for C++:
Introductory Videos for C++ in Visual Studio Code -
Or look at this post:
C++ Project setup VSCode