visual studio code execute line by line c++ code example
Example 1: debugging c++
Run the code with gdb ./yourCode
Use 'run' command to start the program.
When it crashes use 'bt'(back trace) command to find where it happened.
Example 2: how to run c program from visual studio terminal
Fire up the terminal from VS code
Use the command "gcc filename.c" to compile the program
Use the command ".\a.exe" to run the program from the terminal
P.S. Remove "" before exceuting