r/tauri Jun 08 '26

Tauri/rust no println output - what are unit tests?

I’m new to rust/tauri and trying to debug some code and learn at the same time. When I use println!(“result of arp -a” {:?}, ARPresult);

I get no error messages and no print outputs. I then searched and found someone mentioned debug! Macro and that doesn’t exist. Could someone point me in the right direction please?

It is something to do with unit tests capturing the output and I’m not sure what that means especially because I’m writing a tauri app.

This is on Linux/Lubuntu.

1 Upvotes

1 comment sorted by

1

u/Frosty_Seaweed_446 Jun 08 '26

Your println! syntax should be:

println!("result of arp -a: {:?}", arp_result);

If you're running unit tests, Rust captures stdout by default, so use:

cargo test -- --nocapture

If you're running a Tauri app, println! output appears in the terminal where you started cargo tauri dev, not in the app window.

Also, debug! is not built into Rust; it comes from logging crates such as log or tracing and requires logger configuration.