Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsJul 20, 2026·3 min de lectura

VS Code C/C++ Extension — IntelliSense and Debugging for C and C++

Microsoft's official VS Code extension providing IntelliSense, debugging, code browsing, and refactoring for C and C++ projects on any platform.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
VS Code C/C++ Extension
Comando de instalación directa
npx -y tokrepo@latest install fda37ff6-8418-11f1-9bc6-00163e2b0d79 --target codex

Ejecutar después de confirmar el plan con dry-run.

Introduction

The C/C++ extension by Microsoft brings full-featured IntelliSense, debugging, and code navigation to Visual Studio Code. It transforms VS Code into a capable C and C++ IDE with support for GCC, Clang, and MSVC toolchains across Linux, macOS, and Windows.

What the C/C++ Extension Does

  • Provide context-aware code completion and parameter hints for C/C++
  • Enable breakpoint debugging with GDB, LLDB, and the Visual Studio debugger
  • Navigate code with Go to Definition, Find All References, and Call Hierarchy
  • Display inline diagnostics and compiler errors as you type
  • Support CMake, Makefile, and compile_commands.json project configurations

Architecture Overview

The extension runs a language server process that parses your C/C++ source files and headers using a custom IntelliSense engine. It reads compilation databases or user-configured include paths to resolve symbols accurately. For debugging, it communicates with GDB or LLDB through the Debug Adapter Protocol, providing a graphical debug experience in the VS Code UI.

Self-Hosting & Configuration

  • Install from the VS Code marketplace; works on Linux, macOS, and Windows
  • Configure include paths and compiler settings in c_cpp_properties.json
  • Point to a compile_commands.json for accurate project-wide IntelliSense
  • Set up launch configurations in launch.json for debugging
  • Pair with the CMake Tools extension for seamless CMake project integration

Key Features

  • IntelliSense engine provides accurate completions even in large codebases
  • Integrated debugging supports conditional breakpoints, watch expressions, and memory inspection
  • Code formatting with clang-format integration and configurable styles
  • Header/source switching with a single keyboard shortcut
  • Remote development support via SSH, containers, and WSL

Comparison with Similar Tools

  • CLion — full C++ IDE by JetBrains; VS Code C/C++ is free and lighter weight
  • clangd — alternative language server; the Microsoft extension offers tighter VS Code integration
  • Eclipse CDT — Java-based IDE; VS Code provides a faster, more modern editing experience
  • Code::Blocks — standalone C++ IDE; VS Code offers a larger extension ecosystem

FAQ

Q: Which compilers are supported? A: GCC, Clang, and MSVC on their respective platforms. The extension auto-detects installed compilers.

Q: Can I use it with CMake projects? A: Yes. Install the CMake Tools extension alongside it for full CMake integration including build, test, and debug.

Q: How do I fix IntelliSense errors? A: Ensure your include paths are correctly configured in c_cpp_properties.json or provide a compile_commands.json file.

Q: Does it support C++20 and C++23 features? A: Yes. Set the cppStandard property in your configuration to enable modern C++ standard support.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados