Python · VS Code · Developer Tools

I Was Mentally Tracing Python Call Stacks for Hours.
Then I Created This.

March 21, 2026 Rajveer Rathod 10 min read Python, VS Code, Debugging
TL;DR CallFlow Tracer is a VS Code extension that turns your Python code's execution into an interactive visual graph — call relationships, performance flamegraphs, async timelines, and OpenTelemetry export, all without leaving your editor.

The Problem Nobody Talks About Enough

Have you ever opened a Python file you didn't write, stared at it for 20 minutes, and still had no idea how it actually runs?

Or maybe you've spent a full afternoon chasing a performance bug, adding print() statements like breadcrumbs through a forest, only to discover the bottleneck was buried three levels deep in a helper function you forgot existed?

We spend a lot of time talking about writing code — clean code, SOLID principles, design patterns. But we don't talk nearly enough about reading and understanding code, which is where most of your actual working hours go.

Your existing options? cProfile outputs walls of text. py-spy lives in your terminal. Manual print debugging is timeless but you know how that goes.

What if your editor just showed you how the code runs?

Enter CallFlow Tracer

CallFlow Tracer is an open-source Python library that traces function execution and renders it as an interactive call graph. The VS Code extension brings this directly into your editor — no terminal juggling, no separate tools.

Here's the simplest possible way to use it:

1
Open any Python file in VS Code
2
Right-click in the editor
3
Hit "CallFlow: Trace Current File"

A side panel opens with a live, interactive network graph — function nodes, call relationships, execution times, color-coded by module. Slow functions glow red. Fast ones stay green.

Installing It

From the VS Code Marketplace: Press Ctrl+Shift+X (or Cmd+Shift+X on Mac), search "CallFlow Tracer", and click Install. The extension handles the Python package automatically.

Or install the package manually:

# Install the Python library
pip install callflow-tracer

# Or install from source
cd /path/to/callflow-tracer/vscode-extension
code --install-extension callflow-tracer-2.0.0.vsix

The Features That Actually Matter

🕸️

Interactive Call Graphs

Force-directed, Hierarchical, Circular, and Timeline layouts. Filter by module, search functions, zoom and pan.

🔥

Flamegraph View

Classic performance visualization. Green = fast, Red = slow. Click any bar to drill into specific call paths.

Async / Await Support

Timeline layout shows concurrent coroutine execution. Spot sequential awaits that could be parallelized.

📡

OpenTelemetry Export

Export traces to Jaeger, Honeycomb, Datadog — any OTel-compatible backend. Bridge local dev and production.

🎯

Trace Selected Functions

Focus on one function and everything it calls. Perfect for third-party library analysis.

🤖

Auto-Instrumentation

Traces requests, Redis, boto3, SQLAlchemy, psycopg2 automatically — no code changes needed.

Flamegraph View

If you're debugging performance specifically, switch to the Flamegraph view:

# Command Palette
CallFlow: Show Flamegraph

Same view you'd get from a production APM tool, for your local code, with zero setup.

Auto-Trace on Save

For active development sessions, turn on automatic tracing in settings.json:

{
  "callflowTracer.pythonPath": "python3",
  "callflowTracer.defaultLayout": "force",
  "callflowTracer.autoTrace": true,
  "callflowTracer.enableProfiling": true,
  "callflowTracer.anomalyThreshold": 2.0,
  "callflowTracer.autoInstrumentation": true
}

Every save triggers a fresh trace. Instant feedback on how your changes affect call graphs and execution times.

Using It from Code

from callflow_tracer import trace_scope

with trace_scope() as graph:
    your_function()

# Export for VS Code visualization later
graph.export("trace.json")

Real Scenarios Where This Shines

1

Legacy Codebase Onboarding

Open the main entry point, run the trace, instantly get a map of what calls what. No more reading bottom-up trying to piece together execution flow mentally.

2

Slow API Endpoint

Trace the handler, open the flamegraph, find the wide red bar. No more guessing which of your twelve database calls is the problem.

3

Async Code Debugging

Timeline layout shows concurrent coroutine execution across time. Identify sequential await patterns that should be parallelized.

4

Code Review Aid

Trace the PR code, export as PNG, attach to your review comment. "This function gets called 47 times per request" lands harder than a text comment.

5

Production Debugging

Reproduce locally, trace, export to OTel, compare against production traces. Correlation between local and production is often surprisingly close.

How It Compares

Tool Visualization Interactive Async OTel Export Jaeger VS Code
CallFlow Tracer ✅ Yes ✅ Yes ✅ Full ✅ Yes ⚙️ Soon ✅ Native
cProfile ❌ Text ❌ No ⚠️ Limited ❌ No ❌ No ❌ No
py-spy ⚠️ Flame ⚠️ CLI ✅ Yes ❌ No ❌ No ❌ No
PyInstrument ⚠️ Flame ❌ No ✅ Yes ❌ No ❌ No ❌ No
Jaeger Client ❌ None ❌ No ✅ Yes ✅ Yes ✅ Native ❌ No
Try It in 30 Seconds Open VS Code → Ctrl+Shift+X → Search "CallFlow Tracer" → Install → Open any Python file → Right-click → "CallFlow: Trace Current File". That's it.