How to retrieve logging made using `debug` in a choice?

Hello,

I have daml code that I ran using

daml start --sandbox-option="--debug"

My daml template is a simple one with a single choice and a debug call. However, the debug message doesn’t show up, not from the stdout in the daml start call above, and not from the client application (python dazl client) stdout.

The debug message also doesn’t show up when I ran test:

daml test --debug

I think I’m missing something obvious. How do we get debug (in template choice) log to show up in stdout?

Thank you!

Hi @thm and welcome to the Daml developers forum :wave:

As far as I know the debug option in the --sandbox-option="--debug" is not valid. I suggest reading the section in the docs on how to test and debug Daml contracts and also to take our interactive tutorial on it.

@nemanja daml test --debug seems valid, however. It’s listed in daml test --help

1 Like

Thnx for the reply @mesch!

@thm Can you share the template and Daml script used for debugging? I’m just guessing here but if I read the docs’ section on debugging right it could be that the debug message is never reached.

Both allow you to print something to StdOut if the code is reached.