Flow Tracing
Free All flow tools work from the filesystem — no addon required.
What is Flow Tracing?
Section titled “What is Flow Tracing?”Flow tracing follows data and signals across your entire codebase from source to sink. It’s fundamentally different from text search — instead of finding where a string appears, it understands the semantic connections between code elements.
Consider this scenario: your UI shows “Unknown” for an order status. A text search for “Unknown” might return dozens of results. Flow tracing starts at the UI label, follows the binding back to the data source, traces through the manager that populates it, and identifies exactly where the string originates — maybe it’s a default value in Order.gd that’s set when the status enum doesn’t match.
This semantic understanding is what makes GodotIQ’s flow tools powerful for debugging, refactoring, and understanding complex game logic.
trace_flow
Section titled “trace_flow”Follows data and signal flow across the entire codebase from a starting point to all endpoints. Given a signal, function call, or variable, it traces every path the data takes through the project.
When to Use It
Section titled “When to Use It”- Debugging: “where does this value come from?” or “where does this data end up?”
- Understanding complex event chains that span multiple scripts and scenes
- Finding all code paths that affect a specific game state
Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
trigger | string | required | Exact function or signal name to trace (e.g., "start_print_job", "order_completed") |
depth | int | 10 | Maximum recursion depth |
detail | string | "normal" | "brief" (steps only), "normal" (+ line numbers, failure points), "full" |
Example
Section titled “Example”Prompt: “The order status shows ‘Unknown’ in the UI. Trace where that comes from.”
{ "tool": "trace_flow", "args": { "trigger": "get_status_text" }}{ "trigger": "get_status_text", "paths": [ { "path": [ { "file": "res://scenes/ui/OrderPanel.gd", "line": 34, "code": "status_label.text = order.get_status_text()", "type": "method_call" }, { "file": "res://scripts/data/Order.gd", "line": 48, "code": "func get_status_text() -> String:", "type": "method_def" }, { "file": "res://scripts/data/Order.gd", "line": 52, "code": "return \"Unknown\" # default fallback", "type": "return_value", "note": "Reached when status enum has no match" } ], "conclusion": "Default fallback in Order.get_status_text() at line 52" } ], "total_paths": 1, "depth_reached": 3}- The
depthparameter prevents infinite loops in circular references — increase it for deeply nested architectures - Use
detail: "brief"when you just need the execution path steps
Related Tools
Section titled “Related Tools”- Code analysis —
signal_mapanddependency_graphprovide the structural data that flow tracing builds on - Spatial tools — Combine spatial analysis with flow tracing to understand gameplay systems
- Guides: Workflows — Common debugging workflow patterns