Skip to main content

Crate dbgflow_core

Crate dbgflow_core 

Source
Expand description

Core runtime for the dbgflow graph debugger.

This crate contains the in-memory session model, event collector, session persistence helpers, and the embedded local UI server.

§Module Structure

  • [session]: Core data types for sessions, nodes, edges, and events
  • runtime: Runtime state management and event recording
  • [server]: Embedded HTTP server for the debugger UI
  • [ui]: Embedded UI assets

§Quick Start

use dbgflow_core::{reset_session, current_session, serve_session};

reset_session("My Debug Session");
// ... run instrumented code ...
serve_session(current_session(), "127.0.0.1", 3000)?;

Modules§

runtime
Runtime helpers used by generated macros and advanced callers.

Structs§

Edge
Directed edge between two graph nodes.
Event
Single recorded execution event.
FunctionMeta
Static metadata generated for traced functions.
Node
Graph node metadata persisted in a debugging session.
Session
Complete replayable debugging session.
TypeMeta
Static metadata generated for #[ui_debug] types.
ValueSlot
Named value preview attached to an event.

Enums§

EdgeKind
Supported edge types in the session graph.
EventKind
Supported event kinds emitted by the runtime.
NodeKind
Supported node types in the session graph.

Traits§

UiDebugValue
Trait implemented for values that should appear as UI data nodes.

Functions§

capture_session
Runs a closure inside a fresh in-memory capture session.
capture_session_and_serve
Runs a closure, then serves the captured session over the local UI server.
capture_session_to_path
Runs a closure, then writes the captured session to a JSON file.
current_session
Returns a snapshot of the current in-memory session.
read_session_json
Reads a session from a JSON file.
reset_session
Clears the runtime and starts a new in-memory session.
serve_session
Serves a session over the embedded local HTTP server.
serve_session_with_rerun
Serves a session over the embedded local HTTP server and exposes a rerun API.
type_preview
Produces a cheap type-oriented preview for values captured by trace arguments.
write_session_json
Writes the current session to a JSON file.
write_session_snapshot_from_env
Writes the current session into the directory pointed to by DBG_SESSION_DIR.
write_session_snapshot_in_dir
Writes the current session into a directory using a sanitized file name.