Code Function Graph
Code Function Graph shows how functions connect inside the current file so you can understand code flow without manually jumping around.
It is useful when you are reading unfamiliar code, tracing what calls what, or checking how a Unity-oriented C# script is structured.
What It Does
- Draws an interactive function call graph inside VS Code
- Shows caller-to-callee relationships in the current file
- Lets you click a function node to jump to its definition
- Lets you click a connection to jump to the call site
- Refreshes the graph while you edit
- Exports graph data as JSON or Mermaid
Where It Helps
- Exploring a new file quickly
- Understanding execution flow
- Following large functions and helper chains
- Inspecting Unity lifecycle methods and RPC-style entrypoints
- Spotting decorators, attributes, and important entry functions
Supported Languages
- TypeScript / JavaScript
- Python
- C#
How To Use
- Open a supported file.
- Run
Code Graph: Open Code Function Graph.
- Read the graph in the webview panel.
- Click nodes to move to definitions.
- Click edges to move to call locations.
Language-Specific Support
TypeScript / JavaScript
- Functions
- Methods
- Constructors
- Getters and setters
Python
- Functions
- Methods
- Decorators
- Async functions
C#
- Methods
- Constructors
- Attributes
- Unity lifecycle methods
- Coroutine-like methods returning
IEnumerator
- RPC-style entrypoints
Unity Support
For Unity-oriented C# files, the graph adds extra cues for:
Awake, Start, Update, and other lifecycle methods
- Methods returning
IEnumerator
[ContextMenu]
- RPC-style attributes such as
[ServerRpc], [ClientRpc], and [Command]
Requirements
- VS Code
1.85.0 or higher
- Python
3.7+ only if you want Python analysis
| |