Visualize code

You can use the visualization and modeling tools in Visual Studio to help you understand existing code and describe your application. This lets you visually learn how your changes might affect the code and help you assess the work and risks that result from those changes. For example:

  • To understand the relationships in your code, map those relationships visually.

  • To describe your system's architecture and keep the code consistent with its design, create dependency diagrams and validate code against these diagrams.

  • To describe class structures, create class diagrams.

These tools also help you communicate more easily with the people involved with your project.

To see which editions of Visual Studio support each feature, see Edition support for architecture and modeling tools

What do you want to do?

Scenario Articles
Understand code and its relationships:

Map relationships between specific pieces of code.

See an overview of the relationships in your code for the entire solution.
- Map dependencies across your solutions
- Use code maps to debug your applications
- Find potential problems using code map analyzers
- Map methods on the call stack while debugging
Understand class structures:

Visualize the structure of classes in a project by creating class diagrams from code.
How to: Add Class Diagrams to Projects (Class Designer)
Describe the high-level system design and validate code against this design:

Describe the high-level system design and its intended dependencies by creating dependency diagrams. Validate code against this design to make sure dependencies in code remain consistent with the design.
- Create dependency diagrams from your code
- Dependency Diagrams: Reference
- Dependency Diagrams: Guidelines
- Validate code with dependency diagrams


The Text Template Transformation component is automatically installed as part of the Visual Studio extension development workload. You can also install it from the Individual components tab of Visual Studio Installer, under the SDKs, libraries, and frameworks category. Install the Modeling SDK component from the Individual components tab.