Flash Run C/C++
One-click C/C++ Compiler & Runner for VS Code
Created by hjun1052 (KDMHS WP 24)
📌 Overview
Flash Run C/C++ is a lightweight, lightning-fast Visual Studio Code extension that compiles and runs your C/C++ code in a single click. Whether you're a student, hobbyist, or professional, this tool boosts your C/C++ programming workflow by eliminating the need for manual compiling. Don't care about your OS or compiler type. Flash Run C/C++ can work in Windows, macOS, Linux, and supports GCC, Clang, TCC, g++ Compiling.
✨ Features
- One-click compilation and execution of C/C++ programs
- Run Seleted lines of C/C++ file
- Run C/C++ code with pre-entered input values
- Cross-platform support (Windows/macOS/Linux)
- Compiler auto-detection and error handling
- Minimal setup, clean interface
- Tab-based integration with the Flash Run C/C++⚡️ button
- Automatically run all test cases from input.txt and output.txt
Operating Systems:
✅ Windows
✅ macOS
✅ Linux
Compilers:
✅ GCC
✅ Clang
✅ TCC
✅ g++
Supported UI Languages:
🌐 English
🇰🇷 Korean (한국어)
🇨🇳 Chinese (中文)
🇯🇵 Japanese (日本語)
🇫🇷 French (Français)
🇪🇸 Spanish (Español)
🚀 How to Use
One-click Compile&Run
- Open a
.c
or .cpp
file in VS Code.
- On the top tab bar, click the
▶️ Flash Run C/C++⚡️
button.
- Your code will be compiled and executed in the terminal instantly.
Run selected lines (Beta)
- Select lines of your C/C++ code by dragging or shift + arrow_keys.
- Right-click on it, then click
[C/C++ ⚡️] Run Selected Lines (Experimental)
- Selected lines will be compiled and executed in the terminal instantly.
- Right-click on anywhere of your C/C++ editor screen.
- Click
[C/C++ ⚡️] Run C/C++ with Input (Experimental)
.
- Enter your stdin input and press
enter
. Your code will be compiled & run instantly.
Since this feature is experimental, it may not work as you expect.
- Create
input.txt
and output.txt
files in the same directory as your C/C++ file.
- Each line in
input.txt
represents a separate test case input.
- Each corresponding line in
output.txt
should contain the expected output for the same test case.
- Open your source file in VS Code.
- Open the Command Palette (⇧⌘P or Ctrl+Shift+P) and run:
Flash Run C: Run All Test Cases
- The extension will compile your program, execute each test case, and compare results.
- Pass/fail results will be shown for each test, and a summary will be displayed.
⚠️ The number of lines in input.txt
and output.txt
must match, or execution will be cancelled.
⚠️ Make sure your compiler (GCC, Clang, g++ or TCC) is installed and added to your system path.
⚙️ Configuration
Flash Run C/C++ supports several customizable settings in your VS Code settings.json
to better fit your development workflow.
To change these settings, go to:
File > Preferences > Settings (or Cmd+,
on macOS) → search for Flash Run C/C++
You can also edit them directly in .vscode/settings.json
or your global settings file.
Available Settings
flashRunC.compiler
Set the default compiler to use.
Options: "gcc"
, "clang"
, "tcc"
, "g++"
Default: "gcc"
flashRunC.compilerFlags
Additional compiler flags to use during compilation.
Default: "-Wall -Wextra -std=c11"
flashRunC.outputName
Name of the output binary file. Leave empty to use a default name based on source filename.
Default: ""
(empty)
flashRunC.autoDeleteExecutable
Automatically delete the generated executable file after running.
Default: false
flashRunC.enableBuildFolder
Enable saving compiled binaries in a separate build folder.
Default: false
flashRunC.buildFolder
Name of the folder to store compiled executables (used only if enableBuildFolder
is true).
Default: ".build"
flashRunC.testTimeout
Timeout (in milliseconds) for each test case when using the test runner.
Minimum: 100
Maximum: 30000
Default: 5000
🛠️ Compiler Installation Guide
Windows
✅ GCC / g++ (via MinGW):
✅ Clang:
✅ TCC:
macOS
✅ GCC / g++ / Clang:
- Install [Xcode Command Line Tools]:
xcode-select --install
Clang comes by default with Xcode. GCC is available via Homebrew:
brew install gcc
✅ TCC (optional):
brew install tcc
Linux
✅ GCC / g++ / Clang:
- Install using your package manager:
sudo apt install gcc clang
✅ TCC:
sudo apt install tcc
🌐 GitHub
View source code and contribute at:
🔗 https://github.com/hjun1052/flash-run-c-vsc
Feel free to open issues or pull requests to improve this extension!