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.
- Function
Meta - Static metadata generated for traced functions.
- Node
- Graph node metadata persisted in a debugging session.
- Session
- Complete replayable debugging session.
- Type
Meta - Static metadata generated for
#[ui_debug]types. - Value
Slot - Named value preview attached to an event.
Enums§
- Edge
Kind - Supported edge types in the session graph.
- Event
Kind - Supported event kinds emitted by the runtime.
- Node
Kind - Supported node types in the session graph.
Traits§
- UiDebug
Value - 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.