Install the extension from the VS Code Marketplace
Ensure madge and Graphviz are installed on your system
Usage
Right-click on any .js, .jsx, .ts, or .tsx file in the Explorer
Select "Generate Dependency Graph" from the context menu
View the generated dependency graph in a new panel
Configuration
Setting
Description
Default
madge.tsconfigPath
Path to tsconfig.json relative to workspace root. Leave empty for auto-detection.
""
tsconfig.json Auto-Detection
When madge.tsconfigPath is left empty, the extension automatically searches for a tsconfig.json file starting from the selected file's directory and traversing up to the workspace root.