For new Move developers, It’s difficult to debug. Console.log is a useful tool in javascript, I have introduced it to Move as a stdlib module, I am wondering if it’s possible to make a PR to official repo?
Here’s example:
import 0x0.Console;
main() {
let x: u64;
let addr: address;
let b: bool;
let constant: vector<u8>;
let r: u64;
constant = h"aaaaaaaa";
x = 100;
b = true;
addr = 0x0;
r = Console.log<bool>(&b);
r = Console.log<address>(&addr);
r = Console.log<u64>(&x);
r = Console.log<vector<u8>>(&constant);
return;
}
Here is what you see in console.
Bool=>Value(Bool(true))
Address=>Value(Address(00000000000000000000000000000000))
U64=>Value(U64(100))
Vector(U8)=>Value(Container(RefCell { value: U8([170, 170, 170, 170]) }))