Search code examples
substraterust-ink

On Substrate ink! How can I get Debug information?


  1. I want to get Debug Information.
  2. I implemented this code,but I can not get.
  3. Please tell me how can I get Debug Infomation.
        #[ink(message)]
        fn set_test_data(&mut self, value: String) {
            ink_core::env::println(value);
            self.test_data.set(value);
        }

Solution

  • Those error messages are printed to the console. Please note that you need to supply the following command line arguments to your node in order to make this happen:

    1. --dev: Use the dev chain spec. You should already be using that.
    2. -lruntime=debug: Increase the log level for runtime generated messages.