Add this to your Cargo.toml
:
toml
[dependencies]
develop_debug = { version = "0.1.0", features = ["debug"] }
Use the develop_debug!
:
``` rust use develop_debug::*;
let x = "dear X"; let say = "hello world!"; let array = vec!["a", "b", "c"]; let title2 = "balabala...";
developdebug!(title "example",title2);
developdebug!(var x,say);
developdebug!(iter array.iter());
developdebug!(done "genius!");
developdebug!(error "dude, this road is blocked.");
developdebug!("{}","Use it just as you would with the println!()
macro.");
```
Output:
``` output 🀠example 🀠balabala... 🔷 ‹ x › = ‹dear X› 🔷 ‹ say › = ‹hello world!› 🔶 array.iter() 🔸 "a" 🔸 "b" 🔸 "c" 🌱 done. 🌱 genius!
💥 error. 💥 dude, this road is blocked.
🰠Use it just as you would with the println!()
macro.
```
Using the develop_debug!
shortcut, print the same output as above :
``` rust use develop_debug::*;
let x = "dear X"; let say = "hello world!"; let array = vec!["a", "b", "c"]; let title2 = "balabala...";
ddtitle!("example", title2);
dd_var!(x, say);
dditer!(array.iter());
dddone!("genius!");
dderror!("dude, this road is blocked.");
dd__!("{}","Use it just as you would with the println!()
macro.");
```
develop_debug!
shortcut?😬 I think it's easy to recognize in the source code ;
🤤 I think it's convenient to prompt in VS Code
;
🤓 I think it visually splits up the code ;
😬 Add this to your Cargo.toml
when developing :
toml
[dependencies]
develop_debug = { version = "0.1.0", features = ["debug"] }
🤓 Modify Cargo.toml
when you are ready to release :
toml
[dependencies]
develop_debug = { version = "0.1.0" }
develop_debug!
macro expands to empty;🥺, please forgive my lack of English. All the documents are explained by the translation software; If you can provide a better translation, please contact me at code@autodo.xyz;
I hope this simple library is of some help to you.
After switching features, then execute cargo
to report an error:
``` sh cargo build ... error: failed to remove .../target/debug/deps/generates-...: No such file or directory (os error 2)
cargo clean cargo build ```