You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C/C++ Pro: Fast C/C++ Extension for Visual Studio Code
C/C++ Pro combines the blazing index and AST completion speed of LLVM's clangd with the turnkey developer experience of modern IDEs. It provides instant symbol search, zero-configuration compiler discovery, integrated DAP debugging, native Visual Studio solution (.sln / .slnx) support, struct memory layout inspection, build time bottleneck analysis, and unit test discovery right out of the box.
Clangd Substrate: Fast semantic completions, instant signature help, precise go-to-definition, find-references, and rename refactorings.
Rich AST Hover Transformer: Enriches documentation with standard library insights, algorithmic complexity guarantees, exception safety notes, and direct links to cppreference.com.
C++ Postfix Completion Templates: Expand expressions fluently using postfix operators like .if, .for, .var, .unique, .shared, .cast, .return, and .beg...end.
Inactive Preprocessor Region Dimming: Inactive #if, #ifdef, #elif, and #else code blocks are dimmed accurately based on compiler preprocessor evaluation.
Automated Doxygen Generation: Type /** above functions, structs, or classes (or invoke the code action) to generate complete Doxygen docstrings with parameter and return tags.
2. Zero-Configuration Compiler & SDK Discovery
Automatic Compiler Probing: Detects installed MSVC (cl.exe), Clang (clang++), GCC/MinGW (g++), and WSL toolchains without manual path configuration.
Flags Synthesis: Generates compile_flags.txt on-demand via the Command Palette (C/C++ Pro: Generate compile_flags.txt) and synthesizes compilation flags for single-file scripts and unstructured projects.
Ecosystem & SDK Discovery: Out-of-the-box detection of common graphics and system SDKs:
Vulkan SDK (C:\VulkanSDK\<version> or $VULKAN_SDK)
raylib (C:\raylib or /usr/local/include/raylib)
CUDA Toolkit ($CUDA_PATH)
Boost C++ Libraries (C:\local\boost_*, /usr/include/boost)
SDL2 / SDL3
vcpkg and Node-API (node-addon-api, nan) includes
3. Visual Studio Solution & Project Integration
Solution Formats: First-class support for traditional .sln and the modern XML-based .slnx solution formats.
Project Parsing: Extracts include directories, preprocessor definitions, language standards, and forced includes from .vcxproj files across all configurations (Debug/Release, x64/x86/ARM64).
Compilation Database Generation: Generates a unified compile_commands.json covering all C++ source files in the active solution.
MSBuild Task Provider: Generates build, rebuild, clean, and per-project tasks automatically accessible via VS Code's Task runner.
4. Integrated DAP Debugging & Run Controller
Zero-Setup Debugging: Seamlessly hooks into lldb-dap, GDB (--interpreter=dap), or MSVC for native C/C++ debugging.
Interactive Process Picker: Select running processes to attach with cross-platform PID and name resolution.
Evaluatable Expression Provider: Evaluate nested member accesses (a->b.c), indexed arrays (arr[i]), and pointers when hovering during debug breaks.
Run & Debug Editor Title Actions: One-click play and debug buttons in the editor title bar with automated Visual Studio Developer Shell (vcvarsall) environment injection on Windows.
5. Type & Memory Layout Inspector
Inspect struct and class memory layouts directly inside the editor (c-cpp-pro.inspectMemoryLayout).
Visualize field byte offsets, member sizes, struct alignment, and wasted memory from padding holes.
Visual indicators for 64-byte CPU cache line boundaries to optimize data structures for cache locality.
6. Include Tree & Build Bottleneck Visualizer
Header Dependency Hierarchy: Analyze #include trees, detect circular inclusion cycles, and receive optimization tips for heavy headers (c-cpp-pro.analyzeIncludes).
Clang -ftime-trace Profiling: Inspect Chrome tracing JSON files to pinpoint slow template instantiations and expensive header parse times (c-cpp-pro.visualizeTimeTrace).
7. Modern C++ Test Explorer
Native VS Code Test Explorer integration for modern C++ testing frameworks.
Automatically discovers tests, suites, and scenarios for:
GoogleTest (TEST, TEST_F, TEST_P)
Catch2 (TEST_CASE, SCENARIO)
doctest (TEST_CASE)
Boost.Test (BOOST_AUTO_TEST_CASE)
8. Macro Expansion & Compile-Time Evaluation
Step-by-Step Macro Expansion: Preview complex object-like and function-like macro expansions directly at cursor position (c-cpp-pro.expandMacro).
constexpr Evaluation: Preview compile-time evaluations and constant folding results (c-cpp-pro.evaluateConstexpr).
9. Inline Disassembly & Compiler Explorer
Open inline assembly output alongside your C++ code (c-cpp-pro.viewDisassembly).
Filter compiler directives, labels, and comments with customizable optimization flags (-O0, -O1, -O2, -O3, -Os, -Oz).
10. Semantic Symbol Hierarchy Graphs
Generate Mermaid diagrams visualizing class inheritance and symbol relationships (c-cpp-pro.showTypeHierarchy).
11. Configuration Editor & Multi-Target Profiles
Modern graphical Webview editor (c-cpp-pro.openSettings) to configure include paths, preprocessor defines, compiler paths, and C/C++ language standards.
Supports .vscode/c_cpp_properties.json and Linux/RTOS Kconfig (.config) files.
Visual Studio Developer Environment switcher (c-cpp-pro.setVsDeveloperEnvironment) to quickly initialize compiler environments.
Getting Started
Install C/C++ Pro from the Visual Studio Code Marketplace.
Open any C or C++ folder or source file.
If clangd is not installed on your system, C/C++ Pro will prompt you to automatically download and install a managed LLVM release.
C/C++ Pro detects your local compiler (MSVC, Clang, or GCC) and configures your project automatically.