/vscode-debug-cpp

Tutorial and set up files to compile and debug C++ in VS Code

Primary LanguageC++

Tutorial and set up files to compile and debug C++ in VS Code

Build

To run the build task that you defined in tasks.json, press ⇧⌘B or from the Terminal main menu choose Run Build Task.

Run

From terminal type /.helloworld

Debug

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.

Original Tutorial

Taken from: https://code.visualstudio.com/docs/cpp/config-clang-mac