Hey A, is there a way to printout / trace debug ko...
# scripting
r
Hey A, is there a way to printout / trace debug kotlin script behavior ? e.g for a line val x = y + z print will be like val x = y + z // y = 12, z = 3
i
Probably not, or at least not out-of-box, if I understand your request correctly. Some possible approaches that you can try: - reflection on the resulting script class instance will allow you to check all defined properties (you can get access to to the instance, if you’re using a host interface, e.g.
BasicJvmScriptingHost
) - REPL can give you results for every snippet - Kotlin scratch files in IntelliJ display intermediate results
1