Skip to main content

DEBUG

Static DEBUG 

Source
pub static DEBUG: Debug
Expand description

Global DEBUG variable (Total.js style)

In Total.js style, DEBUG is a boolean variable that is true when the application is in development mode, and false when in production mode.

This is based on the environment configuration (development vs production), not on the compilation mode.

ยงUsage

use rustf::prelude::*;

if *DEBUG {
    // Enable debug features (development mode)
    println!("Debug mode is active");
}

Note: In Rust, you need to dereference with *DEBUG to get the bool value. For a more Total.js-like experience, you can use DEBUG.get().