The Core Concept
I am proposing a standardized way to generate Runtime Execution Maps natively in Python. The goal is to move beyond text-based tracebacks and logs, creating an interactive visual flow (Sequence Diagrams) of how data moves between functions during a live execution.
The Problem
As Python projects grow in complexity, the mental overhead to track state changes increases. Standard debuggers are “line-focused,” but they don’t provide a “macro-view” of the architecture’s behavior. Developers often spend hours adding print() statements just to visualize a flow that a tool could draw automatically.
How it would work
The tool would leverage a high-level API over the tracing system to:
- Capture Interaction: Map every function call and its entry/exit arguments.
- Logic Filtering: Automatically exclude standard library noise to focus on the developer’s business logic.
- Visual Output: Export the execution trace into an industry-standard format (like Mermaid.js) that can be viewed in any browser.
Key Benefits
- Onboarding: New developers can run a test and see a “map” of how the codebase works instantly.
- Audit: Visualizing where data travels across different modules.
- Educational: A powerful tool for students to understand the Call Stack and recursion visually.
Status
I have a functional Proof of Concept (PoC) that generates interactive HTML diagrams. I would like to discuss if the community sees value in a tool like this becoming a standard part of the Python development workflow.
What are your thoughts on having “Visual Trace” as a standard capability?