Press F6 to compile and run the file with default settings.
Press F7 to specify custom arguments before running.
Press F5 to debug (includes compilation).
Use the status bar or menu icons for quick access.
Tip: You can configure compiler paths, flags, and other options in the extension settings. Enable "Save Before Compile" to automatically save files before building.
Configuration
Key
Description
c-cpp-compile-run.c-compiler
The C compiler path (e.g. /usr/bin/gcc or C:\TDM-GCC-64\bin\gcc.exe)
c-cpp-compile-run.cpp-compiler
The C++ compiler path (e.g. /usr/bin/g++ or C:\TDM-GCC-64\bin\g++.exe)
c-cpp-compile-run.save-before-compile
Save the file before compiling
c-cpp-compile-run.c-flags
C compiler flags (default: -Wall -Wextra -g3)
c-cpp-compile-run.c-linker-flags
C linker flags (e.g. -lm)
c-cpp-compile-run.cpp-flags
C++ compiler flags (default: -Wall -Wextra -g3)
c-cpp-compile-run.cpp-linker-flags
C++ linker flags (e.g. -lm)
c-cpp-compile-run.run-args
Program arguments when running
c-cpp-compile-run.run-in-external-terminal
Run in an external terminal
c-cpp-compile-run.should-show-notifications
Show notifications
c-cpp-compile-run.output-location
Custom output location for the compiled file
c-cpp-compile-run.custom-run-prefix
Prefix command before run (e.g. valgrind ./foobar)
Keybindings
Linux
Windows
Mac
Description
F6
F6
Cmd+R
Compile and run the file
Ctrl+6
Ctrl+6
Cmd+6
Compile and run the file
F8
F8
Cmd+Y
Compile and run the file in an external console
F7
F7
Cmd+T
Compile and run the file with custom arguments and flags