substrate

How to print out tracing message in Substrate runtime development


When working on Parity Substrate runtime development, how can I print out debug message for tracing and inspecting my variables?


Solution

  • Both of the above answers are correct in their own sense/time. Here's a more accurate overview:

    A final useful tip is to: when possible, you can just bloat your code with println! and do SKIP_WASM_BUILD=1 cargo run [xxx]. This is helpful when you are developing and want quick debug prints without any of the setup explained above.