When you want to understand one function or class in depth, vg show is the place to start. It gives the richest single-node view in Vibgrate Graph: what the node is, what it calls, and what calls it.
Prerequisites
Build the code graph first so vg show has data to read:
vg build
Show a node
Run the command to explain a node and inspect its relationships:
vg show
The output describes the selected node along with its callers (what depends on it), its callees (what it depends on), and structural metadata about the node.
How to read the output
- Callers tell you who would be affected if this node changes. A node with many callers is a hub — treat changes to it carefully.
- Callees tell you what this node relies on. They are the immediate dependencies you would follow to understand its behavior.
- Structural metadata situates the node in the broader graph.
Think of vg show as a focused lens: it answers "what is this and how is it wired in?" without you opening multiple files.
When to use it
- Understanding an unfamiliar function before editing it.
- Confirming the direct dependencies of a node during review.
- As a first step before broader queries like impact analysis or call-tree exploration.
From one node to the bigger picture
vg show focuses on a single node and its immediate neighbors. When you want the full reach of a change, move to vg impact. When you want to walk the call hierarchy several levels deep, use vg tree. When you want to know how two nodes connect, use vg path.
vg impact
vg tree
vg path
Related
See the articles on impact analysis with vg impact and exploring the call tree with vg tree to go beyond a single node.