Skip to content
BENIBIX Learn

Call Graph

Development🕸️ Code IntelligenceCode Graphs

Also known as Call Hierarchy, Caller Graph, Function Call Graph

A map of which functions call which, drawn as dots and arrows.

Think of it like

It is like a phone tree. It shows who calls whom, and who they call next.

Example

Lucy opens the call hierarchy for parseDate. It shows two callers. Above them is the checkout function that calls both.

Why it matters

It shows how far a change spreads. It also finds functions that nothing calls at all.

Definition

A call graph shows which functions call which other functions. Each function is a dot, and an arrow means this one calls that one. Following the arrows forward shows what a function needs. Following them back shows who needs it. Editors show a small piece of it as the call hierarchy.
Each arrow means calls. Follow them back to see who is affected.

Common mistake

Missing calls made in odd ways. A function passed around as a value or called by name from a string may not show up.

Key takeaways

  1. 1
    Arrow means calls. From the caller to the callee.
  2. 2
    Look forward. See what a function needs.
  3. 3
    Look back. See who needs it.

Compare