No script result gets printed in Daml Studio when my script doesn't create any contracts

I’m trying to find the best way to write out function return values for debugging.

Creating a script which returns the value I need seems to be a good idea. But when the script doesn’t create any contracts, I cannot see the return value on the tab which opens when I click to Script results, because the tab is totally empty. Is that intentional?

When I put any contract creation into the script, the script result gets printed under the transaction view, so I use this workaround. But this is awkward.

1 Like

That’s a bug. I fixed that last week in Handle absence of table view in Daml Studio (#13245) · digital-asset/daml@a8057a5 · GitHub which will be part of the next snapshot. Note that the fix is in the vscode extension so you need to run daml studio --replace=always for it to work.

3 Likes

Thanks!

I have to start Daml Studio every time like this?

Just once to install the vscode extension. After that you can just invoke vscode directly and it will have the right extension.

Thanks!