Skip to Content
Scalus Club is now open! Join us to get an early access to new features 🎉

Troubleshooting

Firstly, you can use a debugger and debug the Scala code.

You can use log and trace functions to log messages to the execution log.

And there is a ? operator that can be used to log the value of a boolean expression when it is false.

import scalus.builtin.Builtins.trace import scalus.prelude.* import scalus.prelude.log import scalus.uplc.eval.PlutusVM given PlutusVM = PlutusVM.makePlutusV3VM() val sir = compile { val a = trace("a")(BigInt(1)) val b = BigInt(2) log("Checking if a == b") val areEqual = a == b areEqual.? // logs "areEqual ? False" }.toUplc().evaluateDebug.toString
Last updated on