Control-flow graph visualization for VS Code.
This extension adds a Graph Overview to VS Code, showing the CFG (control-flow graph) for the current function.
-
Install via the extension page at the VSCode Marketplace.
-
Open the command-palette (Ctrl+Shift+P or ⇧⌘P) and run the
Function Graph Overview: Show Graph Overview
command. -
Open your code and place your cursor inside a function to see the graph.
-
You can drag the graph view to the other sidebar or to the bottom panel
If you're using a JetBrains IDE, see the JetBrains plugin for further instructions.
You can try it out via an interactive demo if you don't want to install it.
Note that the demo only supports a single function and ignores the cursor location.
Both dark, light, and custom color schemes are supported.
Dark | Light | Custom |
---|---|---|
![]() |
![]() |
![]() |
By default, the color scheme will match the VSCode theme (light or dark).
You can change to a different preset via the settings:
Custom color schemes are created via the interactive demo.
- Enable the
Color Picker
above the graph - Select the colors you want for your color scheme
- Press the
Copy
button to copy the color scheme into the clipboard - Paste the config into the
Custom Color Scheme
field in the VSCode extension settings.
If the graph is too small, enable the "Pan & Zoom" checkbox. You can zoom with the mouse wheel, and pan by dragging the mouse. Additionally, the view will automatically pan to the highlighted node when it changes.
- Go
- C
- C++
- Python
- TypesScript & TSX
- JavaScript & JSX