VS Code Extensions
Function Call Graph Tracer

Function Call Graph Tracer

by sekarmk03

Trace and visualize the full call tree from a root function in a Python codebase

Downloads

100

Rating

5.0 / 5 (2)

Version

0.0.1

Last updated

Jul 16, 2026

Trace a Python function's full call tree from your cursor and view it as an interactive graph, right inside VS Code.

Features

  • Right-click any function in a .py file and run Trace Call Graph from Cursor to recursively walk everything it calls, using Pylance's Call Hierarchy provider.
  • Renders the trace as an interactive graph (root highlighted, external / library calls greyed out, cycles handled safely).
  • Hover a node to see its full signature (parameters and return type).
  • Click a node to jump straight to that function's definition in the editor.
  • Toggle external (stdlib / site-packages) calls on or off, and fit the graph to the view.

Requirements

  • The Pylance extension must be installed and active in your workspace — this extension relies entirely on Pylance's Call Hierarchy provider to resolve calls.
  • A Python interpreter/virtual environment selected for the workspace, so Pylance can resolve imports correctly.

Usage

  1. Open a Python file and place your cursor on a function name.
  2. Right-click and choose Trace Call Graph from Cursor (or run it from the Command Palette).
  3. A graph panel opens showing the call tree rooted at that function.

Known limitations

  • Traces are capped at 400 nodes to avoid runaway graphs on very large codebases.
  • Dynamic dispatch, decorators, and heavy metaprogramming can cause Pylance's call hierarchy to miss some calls — the graph is only as complete as what Pylance itself resolves.

License

MIT

Related extensions