A Visual Studio Code extension that automatically generates a comprehensive, production-ready C++ workspace environment. This extension eliminates the boilerplate setup required for professional C++ development by properly initializing CMake, IntelliSense, formatters, and testing frameworks.
- Automated Workspace Setup: Generates a standardized directory structure (
src/,include/,tests/, etc.). - CMake & Build System: Generates
CMakeLists.txtandCMakePresets.jsonwith presets for Debug, Release, and Sanitizers (ASAN/TSAN/UBSAN). - IntelliSense Configuration: Properly configures VS Code's
settings.json,c_cpp_properties.jsonand.clangdto fully understand your workspace, including dynamically injectedcompile_commands.jsonsupport so dependencies are seamlessly resolved. - Code Quality Tools: Bundles pre-configured
.clang-formatand.clang-tidyfiles tailored for modern C++ development, along with Python scripts to easily execute them across the entire workspace. - Test Framework Integration: Supports automatically setting up GoogleTest (GTest) or Catch2 via CMake's FetchContent mechanism.
- Premium Debugging: Multi-profile
launch.jsonsetup for GDB and CodeLLDB, including dedicated test debugging setups out of the box. - Package Manager Configuration: Provisions initial configuration for
vcpkg(vcpkg.json) orConan(conanfile.txt) based on user selection. - Continuous Integration: Generates a GitHub Actions workflow for cross-platform builds out of the box.
Ensure you have the following installed on your system to fully utilize the generated workspace:
- CMake (3.14 or higher)
- Optional: Python 3 (to run formatting/linting scripts)
- Extensions: It is highly recommended to use either the C/C++ (Microsoft) or clangd extension for intelligent code completion.
- Open an empty folder in VS Code.
- Open the Command Palette (
Ctrl+Shift+Pon Windows/Linux,Cmd+Shift+Pon macOS). - Type C++ Configurator: Initialize Workspace and press Enter.
- Follow the interactive prompts to define:
- Project Name
- C++ Standard (c++17, c++20, c++23)
- Compiler Path (auto-detected from your system PATH)
- Testing Framework (None, GTest, Catch2)
- Package Manager (None, vcpkg, Conan)
Once finished, the extension will generate all necessary configuration files, build scripts, and source files. You can start writing code immediately or build the project using VS Code tasks or the terminal.
The extension generates the following standardized layout:
.
├── .github/
│ └── workflows/
│ └── build.yml
├── .vscode/
│ ├── c_cpp_properties.json
│ ├── extensions.json
│ ├── launch.json
│ ├── settings.json
│ └── tasks.json
├── cmake/
│ ├── CompilerOptions.cmake
│ ├── FetchTests.cmake
│ ├── Options.cmake
│ ├── Sanitizers.cmake
│ └── Warnings.cmake
├── include/
├── src/
│ ├── CMakeLists.txt
│ └── main.cpp
├── tests/
├── tools/
│ ├── run-clang-format.py
│ └── run-clang-tidy.py
├── .clang-format
├── .clang-tidy
├── .clangd
├── .editorconfig
├── .gitattributes
├── .gitignore
├── CMakeLists.txt
├── CMakePresets.json
└── Doxyfile
