To run the build task that you defined in tasks.json, press ⇧⌘B
or from the Terminal
main menu choose Run Build Task
.
From terminal type /.helloworld
Go back to helloworld.cpp so that it is the active file in the editor. This is important because VS Code uses the active file to determine what you want to debug.
Press F5 or from the main menu choose Run > Start Debugging.
Step through the lines and hover over variables or view them in the sidebar to see their contents.
Taken from: https://code.visualstudio.com/docs/cpp/config-clang-mac