DepGraph for VS CodeVisualize and analyze source file dependencies directly in VS Code. This extension brings the full DepGraph analysis toolkit into the editor — interactive graphs, cycle detection, blast radius, file metrics, and import hover previews. PrerequisitesThe extension uses the DepGraph CLI under the hood. Install it from the project root:
This makes the FeaturesInteractive Dependency GraphOpen the command palette and run DepGraph: Show Dependency Graph to launch a Cytoscape.js graph in a webview panel. The graph includes three layout modes (Force, Hierarchy, Concentric), file search, and a right-click context menu for focusing on individual files. The graph uses transitive reduction to remove redundant edges, logarithmic node sizing so hubs don't dominate the view, weighted edges that visually emphasize important dependency paths (thicker, darker, more opaque), and a density-adaptive force layout that adjusts spacing based on graph complexity. Sidebar ViewsThree tree views appear in the Explorer sidebar under a DepGraph section:
Tree ViewA spacious hierarchical tree view shows downstream ("What breaks?") or upstream ("Depends on") dependencies for any file. Nodes display risk indicators, file-type badges, and in-degree counts. Click any node to focus the graph on that file. Import Hover PreviewHover over any import statement to see a mini dependency graph for the imported file — its metrics (depth, impact, stability, blast radius), who imports it, and what it imports, with second-level dependencies shown inline. Cycle membership is flagged with a warning. Supported across all 14 languages: C/C++, JavaScript/TypeScript, Python, Java, Go, Rust, C#, Swift, Ruby, Kotlin, Scala, PHP, Dart, and Elixir. CodeLensInline annotations appear above each file showing inbound/outbound dependency counts, depth, impact, and stability. DiagnosticsThe extension reports cycle membership, excessive dependency depth, and high-impact files as warnings in the Problems panel. The depth threshold is configurable via CommandsOpen the command palette (
Context MenuRight-click any file in the editor to access Show Dependents, Show Dependencies, and Blast Radius directly. SettingsConfigure under
Supported LanguagesC, C++, JavaScript, TypeScript, Python, Java, Go, Rust, C#, Swift, Ruby, Kotlin, Scala, PHP, Dart, and Elixir. Language detection is automatic based on which file types are present in the workspace. Development
Press Architecture
|