Flow Tracing
PRO All flow tools are PRO intelligence tools. Filesystem-only, 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.
godotiq_trace_flow
Section titled “godotiq_trace_flow”Trace execution flow from a function or signal through the entire codebase. Returns chain of calls, signal emissions, failure points.
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": "godotiq_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:
godotiq_signal_mapandgodotiq_dependency_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