See the connections in your C# code.Open any class, and see its dependencies (the other types in your solution it refers to) and dependents (the types that refer to it) mapped out as a graph. Make changes to your code and the graph updates on the fly. Use Code Connections to gain new insights into your code, orient yourself in an unfamiliar codebase, organise source control changes, as a navigation tool, and more. Get started
The dependency graphThe Graph window is where all the action happens. Here you can visualize the dependency relationships between the types in your solution. You can add types manually, automatically, or both at once. Adding elements to the graphAlways include active document and its connectionsBy default, the active document (ie the current tab) will be included in the graph. To toggle this behavior, press the lock icon () in the options panel. Choose via the dropdown whether to include the active document and also all its connections (dependencies and dependents), or the active document only. Select a graph elementSelecting any element in the graph will open the corresponding file for that type. Connections from the selected element will be visually highlighted. If 'Always include active document and its connections' is enabled, the connections of the selected element will be added to the graph. Pin elements to graphElements can be pinned to the graph to stay present even while changing the active document. Use the pin toggle () to pin or unpin an individual element. Right-clicking an element brings up a context menu with more options:
Clear GraphThe Clear Graph button will clear all pinned elements and any custom inclusion modes like Git Mode. If 'Always include active document' is enabled, the active document and its connections will be kept. Top Types ModeEnabling Top Types mode gives you a high-level overview of a solution. It automatically adds top-ranked types to the graph, as measured by one of several metrics. Use the dropdown to choose from the following metrics:
Types with many direct dependents are consumed in many different parts of the code. Types with many dependencies tend to be 'doing a lot', and may for example contain important business logic. The Combined Score metric tries to combine the other metrics in a balanced way to show the overall most important types in the solution. The number of Top Types to show can be configured under the 'More Options' expander. The default is 'Auto' which scales according to the size of the solution. Top types in the graph are identified by a badge with a crown icon, which is colour-coded gold, silver or bronze according to how high the type scores on the selected metric. Git ModeEnabling Git mode will automatically add all locally modified types to the graph. When Git mode is enabled, a badge in the upper right corner of the element indicates if it is a new or modified file. Hierarchy and Compact layoutsChange the way elements are arranged relative to each other in the graph. Hierarchy () arranges elements vertically by dependency relationship, with dependencies above and dependents below. It's useful when you want to clearly see dependency relationships at a glance. Compact () arranges elements in a space-efficient way, without a fixed spatial order. It's useful when you want to visualize a large number of elements at a time. Export optionsExport as bitmapExport the currently displayed graph as a bitmap, either to the clipboard or to a Export as Mermaid diagramMermaid is a popular tool for rendering graphs and diagrams. Mermaid uses a simple, Markdown-like text syntax. This Code Connections graph: Produces the following Mermaid-formatted output:
Which renders like this: FiltersExpanding 'More options' on the options panel will show settings to filter the types that are visible. This lets you focus on what you're interested in, and can also speed up graph generation, particularly in large solutions.
Other settingsAdditional options can be found under
Contribute to Code ConnectionsReport an issueIf you encounter any issues with Code Connections, we welcome bug reports via https://github.com/davidjohnoliver/CodeConnections/issues. You can also submit feature requests and other feedback there, as well as upvote existing issues. Contribute codeCode Connections is free and open source, and anyone is welcome to contribute. If you're fixing a bug, make sure there's an open issue and post a comment on it to let other's know you're working on it. If you have an idea for a new feature, create an issue with a description of the feature to get input and feedback from other contributors. We recommend you get buy-in on the feature design from the maintainers of Code Connections before you start writing code. |