Skip to content

raising inside dbg is not handled  #14005

Closed
@dkuku

Description

@dkuku

Elixir and Erlang/OTP versions

any recent

Operating system

any

Current behavior

Currently when there is an exception we don't get any output in dbg. When debugging pipes I need to add inspects in the pipeline idealy with labels to see where it failed.

[:a, :b]
|> then(fn _ -> raise "breaks dbg" end)
|> dbg

returns

** (RuntimeError) breaks dbg
    #cell:exemuvvgh6ktixl2:2: (file)

Expected behavior

Rendering partial result would be ideal, this way we would know what was the input to the failing function.
Currently the dbg is generated in 2 steps

  • code is executed
  • then the result string is generated

It may be possible if the dbg result would be generated where the code is executed and in case of exceptions we could just display what was generated up to that point.

      abc() #=> [:a, :b, :c]
     |> tl() #=> [:b, :c]
     |> then(fn _ -> raise "boom" end)
      ** (RuntimeError) boom
    #cell:exemuvvgh6ktixl2:3: (file)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions