Skip to main content

Module debugger

Module debugger 

Source
Expand description

Debug log insertion and removal for method chains.

This module provides mutations for inserting trackable debug logs into method chains, and removing them later. All inserted logs are marked with session IDs and timestamps, making it easy to:

  • Insert .inspect(|x| dbg!(x)) between method calls
  • Wrap expressions with dbg!()
  • Insert println! statements
  • Remove all debug logs from a session
  • Remove all ryo-inserted debug logs

§Example

use ryo_mutations::debugger::{DebugSession, InsertInspectMutation};

// Create a session for grouping related debug logs
let session = DebugSession::new();

// Insert inspect after a specific method
let mutation = InsertInspectMutation::new("iter", session.marker_with_desc("after iter"));

// Later, remove all logs from this session
let remove = RemoveDebugLogsMutation::by_session(session.id());

Structs§

DbgWrapMutation
Wrap expressions with dbg!() macro.
DebugMarker
A debug marker that tracks metadata about inserted debug logs.
DebugSession
A session for grouping related debug insertions.
InsertInspectMutation
Insert .inspect() after a method call in a chain.
RemoveDebugLogsMutation
Remove debug logs inserted by ryo.

Enums§

RemovalTarget
Target for removal.

Constants§

MARKER_PREFIX
Prefix used to identify ryo debug markers in comments.