How do you usually debug generated erlang code by Elixir macro

Currently I’m using a script to generate formatted erlang abstract by running :beam_lib and :erl_prettypr functions.
It would be nice if it is possible to open a .beam in a readable format to debug macros?

I’ve used :beam_disasm before as part of demonstrating Elixir compiler bugs, could be helpful:

https://github.com/erlang/otp/blob/master/lib/compiler/src/beam_disasm.erl

2 Likes

I use GitHub - michalmuskala/decompile · GitHub
and I’m happy with it.