Packages

A simple tracer with recording capabilities that would help you in live debugging.

Current section

Files

Jump to
smart_tracer lib examples custom_tracer.ex
Raw

lib/examples/custom_tracer.ex

defmodule SmartTracer.Examples.CustomTracer do
@moduledoc false
use SmartTracer.Custom
def action(:call, {module, fun, args}) do
IO.puts("#{module}.#{fun}/#{length(args)} was called with #{inspect(args)}")
end
def action(:return, {module, fun, arity, return_value}) do
IO.puts("#{module}.#{fun}/#{arity} returned: #{inspect(return_value)}")
end
end