Skip to main content

Module debug

Module debug 

Source
Expand description

Provides diagnostics, debugger traps, and configurable debug logging.

Tracing macros retain their requested levels when extra diagnostics are enabled and otherwise demote events to DEBUG. The module also re-exports conditional result inspection and bounded formatting helpers for diagnostic paths.

Re-exportsยง

use std::any::Any; ๐Ÿ”’
use std::env; ๐Ÿ”’
use std::env; ๐Ÿ”’
use std::panic; ๐Ÿ”’
use std::panic; ๐Ÿ”’
use std::sync::LazyLock; ๐Ÿ”’
use tracing::Level; ๐Ÿ”’
pub use crate::result::DebugInspect;
pub use crate::utils::debug::*;

Constantsยง

INFO_SPAN_LEVEL
Selects INFO or DEBUG for diagnostic tracing spans.

Staticsยง

DEBUGGER
Reports whether the process environment suggests a gdb launch.

Functionsยง

logging
Returns whether extra logging calls retain their requested levels.
panic_handler
Invokes a debugger trap before forwarding a panic to another hook.
panic_str
Extracts a static string slice from a boxed panic payload.
rttype_name
Returns the compiler-generated name of an argumentโ€™s statically inferred type.
set_panic_trap ๐Ÿ”’
trap
Raises a debugger breakpoint on supported build targets.
type_name
Returns the compiler-generated name of a generic type.

Attribute Macrosยง

recursion_depth
Reports an annotated itemโ€™s parsed syntax-tree depth and length during compilation.