API Reference replbug v0.1.0

modules

Modules

Utility for pulling the function call traces into your IEx shell for further analysis and experimentation. The code is built on top of Rexbug (https://github.com/nietaki/rexbug). Motivation: Rexbug provides a convenient way of tracing function calls by printing the trace messages to IEx shell and/or the external file. In addition, Replbug allows to materialize traces as a variable, and then analyze the call data in IEx for debugging, experimentation, collecting stats etc. Example 1: Trace DateTime.utc_now/0. Let the tracer run for 60 secs or until 10 trace messages are emitted. iex(1)> Replbug.start("DateTime.utc_now/0", time: 60_000, msgs: 10) You could either wait for the system to make DateTime.utc_now/0 calls, or call it manually in IEx. At any time, stop collecting traces and get the call trace records: iex(3)> call_traces = Replbug.stop %{ #PID<0.1392.0> => [