Skip to content

Proposal: Pretty format #49

Description

@Dkendal

Hey, first of all thanks for your work on Rexbug - I use it a lot and it adds a lot of value for me.

I've written a "pretty" formatter using Inspect.Algebra that also accepts printing options like Kernel.inspect/2 and I was wondering if this is something you'd consider merging upstream?

If this is something you're interested in I can put together a proposal PR - just let me know if you you'd prefer for it to replace the existing formatter in Rexbug.Printing, be opt-in or any other suggestions.

This is what the tracing output looks like for calls, returns and stack traces:
screenshot of pretty formatter for rexbug

triggered from this example test:

defmodule DemoTest do
  use ExUnit.Case

  test "demo" do
    import Debug

    {:ok, _} = trace(":maps :: stack;return")

    lower_ansi_map = for(c <- ?a..?z, do: {<<c>>, c}, into: %{})
    upper_ansi_map = for(c <- ?A..?Z, do: {<<c>>, c}, into: %{})

    Map.merge(lower_ansi_map, upper_ansi_map)

    trace_stop_sync()
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions