firedbg-lib 0.1.2

FireDBG Support Library
Documentation
  • Coverage
  • 20%
    1 out of 5 items documented1 out of 2 items with examples
  • Size
  • Source code size: 4.54 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.11 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • SeaQL/FireDBG.for.Rust
    1673 39 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • tyt2y3

FireDBG Support Library

fire::dbg!

This macro allows you to capture the value of a variable via runtime inspection in FireDBG.

Usage example:

use firedbg_lib::fire;

fn some_fn(v: i32) -> i32 {
    fire::dbg!(v) + 1
}

fn other_fn(v: i32) -> i32 {
    fire::dbg!("arg_v", v) + 1
}

Which fire::dbg!(v) would expand to __firedbg_trace__("v", v) when compiled under debug mode. The label could be customized, which fire::dbg!("arg_v", v) would expand to __firedbg_trace__("arg_v", v). In release mode, it would expand to an expression passing through the value, i.e. { v }.

Note that the function passes through the ownership of the variable, just like the std::dbg! macro.

fn __firedbg_trace__<T>(name: &'static str, v: T) -> T { v }