Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Flash Run C/C++New to Visual Studio Code? Get it now.
Flash Run C/C++

Flash Run C/C++

hjun1052

|
73 installs
| (2) | Free
Compile and run your C/C++ files instantly with one click.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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

💻 Supported Platforms & Languages

  • 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

  1. Open a .c or .cpp file in VS Code.
  2. On the top tab bar, click the ▶️ Flash Run C/C++⚡️ button.
  3. Your code will be compiled and executed in the terminal instantly.

Run selected lines (Beta)

  1. Select lines of your C/C++ code by dragging or shift + arrow_keys.
  2. Right-click on it, then click [C/C++ ⚡️] Run Selected Lines (Experimental)
  3. Selected lines will be compiled and executed in the terminal instantly.

Run with pre-entered input (Experimental)

  1. Right-click on anywhere of your C/C++ editor screen.
  2. Click [C/C++ ⚡️] Run C/C++ with Input (Experimental).
  3. 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.

Run all test cases from input/output files (Experimental)

  1. Create input.txt and output.txt files in the same directory as your C/C++ file.
  2. Each line in input.txt represents a separate test case input.
  3. Each corresponding line in output.txt should contain the expected output for the same test case.
  4. Open your source file in VS Code.
  5. Open the Command Palette (⇧⌘P or Ctrl+Shift+P) and run:
    Flash Run C: Run All Test Cases
  6. The extension will compile your program, execute each test case, and compare results.
  7. 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):

  • Download: https://www.mingw-w64.org/
  • Add bin directory to PATH

✅ Clang:

  • Install via LLVM pre-built packages: https://releases.llvm.org/
  • Add Clang bin to PATH

✅ TCC:

  • Download from: https://bellard.org/tcc/
  • Add folder containing tcc.exe to PATH

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):

  • Install via Homebrew:
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!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft