Stream: ideas

Topic: Pipe dbg


view this post on Zulip Ryan Bates (Dec 07 2023 at 19:18):

It would be really useful to pipe to dbg and have it return the value so we can inspect in the middle of a list of operations.

[1, 2, 3]
|> List.map foo
|> dbg
|> List.sum

Elixir has this feature.

view this post on Zulip Brendan Hansknecht (Dec 07 2023 at 19:21):

Yep that is a planned feature

view this post on Zulip Brendan Hansknecht (Dec 07 2023 at 19:21):

dbg as an expression.

view this post on Zulip Brendan Hansknecht (Dec 07 2023 at 19:21):

I think someone was even looking into it, but no idea the current state

view this post on Zulip Elias Mulhall (Dec 07 2023 at 19:26):

I started working on the necessary parsing updates, my hope is that I'll have some free time next week :fingers_crossed:

view this post on Zulip Isaac Van Doren (Dec 08 2023 at 02:04):

As a temporary solution you can define your own version like this:

dbge = \x ->
dbg x
x


Last updated: Jun 16 2026 at 16:19 UTC