Empty C project with VS Code integration
cd build
cmake ..
make
Firstly from the command line:
-
Navigate to the
build
folder within theempty-c-project
folder -
Invoke CMake with VSCode support
cmake -DUSE_IDE=vscode ..
Now not on the command line:
-
Open VSCode
-
Dismiss welcome screen
-
In menu
File->Open (Folder)
- Navigate to the folder containing this code, probably named
empty-c-project
-
Install the reccomended extensions, will show up in a box in the bottom right corner
-
Open the source files you want to edit
There are configs for a number of VSCode tasks, this is done via Terminal->Run Task
.
To build use the Run
task, this will also compile the code if you have made changes and saved them.
To debug you can simply navigate to Run->Start Debugging
or just press F5.