Macro ink_env::debug_print

source ·
macro_rules! debug_print {
    ($($arg:tt)*) => { ... };
}
Expand description

Appends a formatted string to the debug_message buffer if message recording is enabled in the contracts pallet and if the call is performed via RPC (not via an extrinsic). The debug_message buffer will be:

  • Returned to the RPC caller.
  • Logged as a debug! message on the Substrate node, which will be printed to the node console’s stdout when the log level is set to -lruntime::contracts=debug.

§Note

This depends on the debug_message interface which requires the "pallet-contracts/unstable-interface" feature to be enabled in the target runtime.