Andrea Leopardi from the Elixir Core team recently introduced a new debug feature in Elixir 1.14+.
"Example"
|> String.upcase()
|> String.split("")
|> Enum.shuffle()
|> dbg()
When running this code, the pipeline will stop at each step.
pry(1)> next
"Example" #=> "Example"
pry(1)> next
|> String.upcase() #=> "EXAMPLE"
pry(1)> next
|> String.split("") #=> ["", "E", "X", "A", ...]
pry(1)> next
|> Enum.shuffle() #=> ["M", "X", "L", "P", ...]
:ok