Function rdbg::flush

source ·
pub fn flush()
Expand description

Flush msg/val queue for default port

NOTE: The first time this function or msg or vals macros are processed determines the port. Once it is established it will not change even if custom port macros or functions are called.

let world = "world!";
rdbg::msg!(rdbg::port(5000), ["Hello {}", world]);

rdbg::vals!(rdbg::port(5000), [world, 1 + 1]);
rdbg::flush();
Examples found in repository?
examples/hello_world.rs (line 5)
1
2
3
4
5
6
7
8
9
10
fn main() {
    let world = "world";

    rdbg::msg!("hello {world}");
    rdbg::flush();
    rdbg::vals!(world, 1 + 5);

    rdbg::msgf!("hello {world}s");
    rdbg::valsf!(world, 2 + 5);
}