elixir-lang/elixir — pull request #2044 by liveforeverx (2014-02-08 10:27:16+00:00)
Title: [Experimental][WiP] Trace macro in a shell

Adding trace macro supporting debugging in an elixir way.

Examples of use: https://gist.github.com/liveforeverx/fc6fa0b8b0cd69a7ab65

Supported cases at the moment:
1) . (trace all module.function with any arity)
2) ./
3) .() (supported only literals that when quoted represents themself at the moment)

In the end implementation will be supported:
1) debug all functions in module(with possibility to choose local or exported)
2) Forms, like: :lists.seq(1, _), all matching forms, like MyModule.myfun({foo,bar, {[1,2,3]}}, _)
and the when forms: MyModule.myfun(a, b) when a > 1 or b < 10
3) options, with possibility to specify the tracing processes.
4) easy form of tracing sending/receiving messages from and to a process

What are you think about having it in elixir?

I'll be grateful for any feedback.