Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CPP-Link-GraphNew to Visual Studio Code? Get it now.
CPP-Link-Graph

CPP-Link-Graph

Kaiwinta

|
4 installs
| (1) | Free
Create a graph of the include of a C based project
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CPP-Link-Graph

Visual Studio Code Extension
Create a graph of the include dependencies in a C-based project


Overview

The CPP-Link-Graph extension for Visual Studio Code analyzes your C++ project's header file dependencies and generates a visual graph to help you understand the relationships between your files.
This tool is particularly useful for identifying unnecessary dependencies and optimizing your project's structure.


Features

  • C++ Header Analysis: Utilizes a native C++ parser to analyze .cpp and .hpp files.
  • Graph Generation: Outputs a Mermaid-compatible graph representing file dependencies.
  • Customizable Output: Supports SVG and PNG formats for the generated graph.
  • Automatic Opening: Optionally opens the generated graph in VS Code upon completion.
  • Workspace Integration: Operates within the context of your VS Code workspace.

Installation

  1. Open Visual Studio Code.
  2. Press Ctrl+P (or Cmd+P on macOS) to open the Quick Open dialog.
  3. Paste the following command and press Enter: ext install Kaiwinta.cpp-link-graph
  4. Alternatively, search for CPP-Link-Graph in the Extensions view (Ctrl+Shift+X or Cmd+Shift+X) and click Install.

Usage

  1. Open your C++ project in VS Code.
  2. Press Ctrl+Shift+P (or Cmd+Shift+P on macOS) to open the Command Palette.
  3. Type Cpp Link Graph: Run Parser and select it.
  4. Choose the desired analysis option:
  • Analyze C++ Includes (hpp only): Generates the dependency graph for .hpp files only.
  • Analyze C++ Includes: Generates the dependency graph for both .cpp and .hpp files.
  • Cancel: Aborts the operation.

The extension will analyze your project's header files and generate a dependency graph.
The graph will be saved in the cpp-link-graph folder within your workspace.
If configured, the graph will automatically open in VS Code.


Configuration

You can customize the extension's behavior through the VS Code settings:

  • cpp-link-graph.outputFormat: Set the default output format for generated graphs. Options: svg, png. Default: png.
  • cpp-link-graph.scale: Adjust the scale factor for Mermaid diagrams. Default: 20.
  • cpp-link-graph.autoOpen: Automatically open the generated graph after creation. Default: true.

To modify these settings, go to File > Preferences > Settings and search for cpp-link-graph.


License

This extension is licensed under the MIT License. See the LICENSE

Support

For issues or feature requests, please visit the GitHub repository

Links

VS Code Extension

Github

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