dbg is an Elixir debugging macro for development-time diagnosis. Like IO.inspect, it returns the expression’s value, while also printing richer evaluation details such as intermediate results in a pipe chain. section 13.3.1
Inspecting a pipeline
Wrap an expression or pipe stage with dbg to observe how values propagate while preserving the surrounding program behavior: expression |> dbg(). Remove the debugging call after finding the error. section 13.3.1
