Twine is a tracing tool based on Ferd's wonderful recon_trace.
recon_trace is great for providing a safe way to debug live BEAM systems,
but can be a little unweildy, especially on Elixir systems. Twine is a wrapper
for recon_trace, and adds a familiar, friendly, syntax.
In a remote shell for your running process,
require Twine
Twine.print_calls(MyModule.my_function(_arg1, _arg2), 3)Just like recon_trace, this will print the first three calls to
MyModule.my_function/2, but will do so in Elixir syntax.
You can even match specific calls by using pattern matching. This will
print all calls to handle_call for the :ping call.
require Twine
Twine.print_calls(MyModule.handle_call(:ping, _from, _state), 3)More details are provided in the hex docs.
def deps do
[
{:twine, "~> 0.4.0"}
]
end