Macro wasm_rs_dbg::dbg[][src]

macro_rules! dbg {
    () => { ... };
    ($val: expr $(,)?) => { ... };
    ($($val: expr),+ $(,)?) => { ... };
}

This dbg! macro is a drop-in replacement for std::dbg

It will use [web_sys::console] on wasm32-unknown-unknown. On all other architectures it will call std::dbg. It will log at debug level by default, and this can configured with this crate's feature flags. For example, specifying features = ["console-log"] will send output at log level instead. Supported flags are:

  • console-debug (default)
  • console-log
  • console-error
  • console-info
  • console-trace
  • console-warn

Note

These flags are exclusive, so it's important to set default-features to false