Is there a function to debug print a list or other object to see what's in it?
dbg [1,2,3]
Ah, the docs don't turn that up.
https://github.com/roc-lang/roc/blob/main/docs/langref/statements.md#dbg-dbg
Its currently a TODO :smiling_face_with_tear:
We will probably do a big pass over the docs soonish I think.
yes, that's a major goal of mine over the next 2 months :smile:
Would love to see this paired with, expected and if a test fails, evaluate last boolean expression and print something like: expected was: actual was:
Yes, Richard has a plan for this, see this topic: #ideas > Inspect x and y when `expect x == y` fails
I am currently going over the mini tutorial and it has explanations for a lot of basic functions, so if I can find some time I could move some ocer to the langref
Last updated: Sep 24 2026 at 15:59 UTC