Stream: beginners

Topic: debugPrint


view this post on Zulip Alper (Sep 03 2026 at 07:51):

Is there a function to debug print a list or other object to see what's in it?

view this post on Zulip Luke Boswell (Sep 03 2026 at 08:38):

dbg [1,2,3]

view this post on Zulip Alper (Sep 03 2026 at 08:45):

Ah, the docs don't turn that up.

view this post on Zulip Luke Boswell (Sep 03 2026 at 10:54):

https://github.com/roc-lang/roc/blob/main/docs/langref/statements.md#dbg-dbg

Its currently a TODO :smiling_face_with_tear:

view this post on Zulip Luke Boswell (Sep 03 2026 at 10:54):

We will probably do a big pass over the docs soonish I think.

view this post on Zulip Richard Feldman (Sep 03 2026 at 12:18):

yes, that's a major goal of mine over the next 2 months :smile:

view this post on Zulip removewingman (Sep 03 2026 at 21:44):

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:

view this post on Zulip Aurélien Geron (Sep 03 2026 at 23:34):

Yes, Richard has a plan for this, see this topic: #ideas > Inspect x and y when `expect x == y` fails

view this post on Zulip TeaDrinkingProgrammer (Sep 04 2026 at 06:30):

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