- In Rust, add
msg!("Some variable: {:?}", variable); - Run
anchor testto run the program through the tests. However you won't find the output there. - View the output instead in a file within your
program-logsfolder in your Anchor project. It'll be recreated each time you run the program.
This is subtly mentioned in the docs and can be found in the CLI docs here: https://book.anchor-lang.com/chapter_4/cli.html#test
