-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
Elixir and Erlang/OTP versions
Main branch
Operating system
n/a
Current behavior
Since we changed dbg
to print intermediate results addressing #14005, the header and value can end up completely separated when the evaluated expression emits its own nested dbg
:
defmodule Baz do
def foo(x), do: dbg(x)
def bar(x), do: foo(x) |> dbg()
end
iex> A.bar(1)
[iex:1: A.bar/1]
[iex:1: A.foo/1]
x #=> 1
foo(x) #=> 1
Expected behavior
In 1.18:
iex> A.bar(1)
[iex:1: A.foo/1]
x #=> 1
[iex:1: A.bar/1]
foo(x) #=> 1
The new behavior is arguably confusing, but I'm not sure if this can be fixed without reverting to the old approach - this might be a trade-off?
Metadata
Metadata
Assignees
Labels
No labels