Skip to main content
A session file is a JSON file that dbgflow writes after capturing a run. It encodes the full execution graph — nodes representing functions, types, and tests; edges representing relationships between them; and a chronological list of events that occurred during execution. The UI reads this file to render the graph and replay your program’s behavior.

Top-level fields

string
required
Human-readable session title shown in the UI header.
Node[]
required
Array of graph nodes. Each node represents a function, type, or test in your codebase.
Edge[]
required
Array of directed edges connecting nodes. Edges describe how nodes relate to each other.
Event[]
required
Ordered list of events captured during execution, sorted by sequence number.

Node object

A node represents a named entity in your codebase: a function, a type definition, or a test.
string
required
Unique identifier for this node within the session. Referenced by edges and events.
string
required
Display name shown in the graph UI, typically the short function or type name.
string
required
The category of this node. One of function, type, or test. See Node kinds below.
string
required
Fully-qualified Rust module path, e.g. my_crate::pipeline::transform.
string
required
Source file path relative to the workspace root.
number
required
Line number where this entity is defined.
string
Optional snippet of the source code for this entity. May be null if source extraction was not enabled.

Node kinds


Edge object

An edge is a directed connection between two nodes. Edges describe control flow, data dependencies, or test relationships.
string
required
The id of the source node.
string
required
The id of the destination node.
string
required
The type of relationship. One of control_flow, data_flow, or test_link. See Edge kinds below.
string
Optional human-readable label displayed on the edge in the graph UI.

Edge kinds


Event object

Events are the timestamped record of what happened during execution. They are listed in order by seq and drive the replay timeline in the UI.
number
required
Monotonically increasing sequence number. Used to order events during replay.
number
Unique identifier for a specific function invocation. Allows the UI to correlate function_enter and function_exit events for the same call. May be null for non-call events.
number
The call_id of the caller. Used to reconstruct the call stack. May be null for top-level calls.
string
required
The id of the node this event is associated with.
string
required
The type of event. See Event kinds below.
string
required
Short description of the event shown in the timeline, e.g. "enter process_batch".
ValueSlot[]
required
Captured variable snapshots at the time of this event. May be an empty array.

Event kinds


ValueSlot object

A ValueSlot is a named, captured value at a point in execution.
string
required
The variable or parameter name, e.g. "input" or "return".
string
required
A string rendering of the value using Rust’s Debug formatter ({:?}). This is a plain string, not structured data.
preview values are produced by Debug formatting. If a type does not implement Debug, dbgflow cannot capture a preview for it and the field will reflect that limitation.

Minimal example

The following is a minimal valid session file with one node and two events representing a single function call.

Multi-pipeline sessions

You can merge multiple session files from a directory to produce a combined view across parallel pipelines or independent runs. dbgflow reads all .json session files in a given directory and merges their nodes, edges, and events into a single unified graph.
When merging sessions from a directory, dbgflow automatically re-namespaces all node IDs, edge references, and event sequence numbers so there are no collisions between sessions.