Ask Your Question

Revision history [back]

Visual Studio has a feature called "Class View" which allows you to see the dependency tree of a C++ file. Follow these steps to access the Class View:

  1. Open the C++ file in Visual Studio.
  2. Go to the "View" menu and select "Class View" (or press "Ctrl + Shift + C").
  3. In the Class View, expand the "All Members" node for the current project.
  4. Find the file you are interested in and right-click on it.
  5. Select "View Dependencies" from the context menu.
  6. A new window will appear, showing the dependency tree of the selected file.

You can also use the "Object Browser" to view the same information. Follow these steps:

  1. Open the C++ file in Visual Studio.
  2. Go to the "View" menu and select "Object Browser" (or press "Ctrl + Alt + J").
  3. In the Object Browser, navigate to the C++ file you are interested in.
  4. Right-click on the file and select "Show Dependencies".
  5. A new window will appear, showing the dependency tree of the selected file.

Both Class View and Object Browser allow you to see the #include dependency tree of a C++ file in Visual Studio, so choose whichever one you prefer.