Skip to main content

Module debug

Module debug 

Source
Expand description

Layout constraint debugging utilities.

Provides introspection into layout constraint solving:

  • Recording of constraint solving steps
  • Detection of overflow/underflow conditions
  • Export to Graphviz DOT format

§Feature Gating

This module is always compiled (the types are useful for testing), but recording is a no-op unless explicitly enabled at runtime.

§Usage

use ftui_layout::debug::{LayoutDebugger, LayoutRecord};

let debugger = LayoutDebugger::new();
debugger.set_enabled(true);

// ... perform layout ...

for record in debugger.snapshot() {
    println!("{}: {:?} -> {:?}", record.name, record.constraints, record.computed_sizes);
    if record.has_overflow() {
        eprintln!("  WARNING: overflow detected!");
    }
}

Structs§

GridLayoutRecord
A record of a grid layout solve operation.
LayoutDebugger
Layout constraint debugger.
LayoutRecord
A record of a single layout solve operation.
LayoutTelemetryHooks