Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>cpp-includes-graphNew to Visual Studio Code? Get it now.
cpp-includes-graph

cpp-includes-graph

verssy

|
149 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

cpp-includes-graph README

Features

This extension is useful if you want to remove some unnecessary header dependencies from your sources (if they were already included in headers above)

As an example, if you have project with such structure:

folder
 |- c.hpp
main.cpp
a.hpp

and files consist of:

main.cpp:

#include "a.hpp"

#include <iostream>

int main()
{
    // ...
}

a.hpp:

#pragma once

#include "folder/c.hpp"

#include <iostream>
// ...

folder/c.hpp:

#pragma once

#include <iostream>
// ...

Then resulting dependency graph will look something like this:

Initial-Image

So, you can delete #include <iostream> from a.hpp and main.cpp and the program will not have redundant dependencies:

Initial-Image

Usage

  1. Open some source or header C++ file
  2. Press Ctrl+Shift+P
  3. Type Analyze C++ Includes
  4. Press Enter
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft