Hey, all!
I'm playing around with the dbg
stuff from the tutorial. While it works fine when I use roc dev
, when using roc run
it's not showing up. I even tried to redirect stderr to a file and still nothing:
$ roc run 2> out.log
There are 5 animals!
$ cat out.log
$
With roc dev
this does work:
$ roc dev 2> out.log
There are 5 animals!
$ cat out.log
[main.roc:19] T "num1 is " num1 = (T "num1 is " 2)
Is this a bug? Or am I misunderstanding something?
No, dbg only compiles into "dev" builds, like dev and test
Long term it should be possible to enable on any compilation, but first we have to do some internal plumbing around how expect works (the two features are tied together).
Got it, thanks for the replies. I was asking because the documentation from the tutorial does mention roc run
:
Note: dbg is a debugging tool, and is only available when running your program via a roc subcommand (for example using roc dev, roc run, or roc test).
Still, not a big issue, I was just wondering if I had misunderstood something or botched the installation somehow :grinning_face_with_smiling_eyes:
Fixed in PR#6619
Last updated: Jul 06 2025 at 12:14 UTC