[erlang-questions] Erlang tracing

Magnus Henoch magnus@REDACTED
Mon Sep 21 13:25:18 CEST 2015


I had a vaguely related idea the other day.  When you trace a 
function that takes an anonymous function as an argument, it's 
printed like this:

8> lists:all(foo:foo(3), [1, 2]).
(<0.33.0>) call lists:all(#Fun<foo.0.99124727>,[1,2])
(<0.33.0>) returned from lists:all/2 -> false

That tells you that anonymous function number 0 in module foo is 
passed as an argument.  It would be convenient to have the 0 be 
the line number where the anonymous function is defined instead, 
so you can quickly figure out exactly which function is being 
passed, in case your module creates several different ones.

Regards,
Magnus




More information about the erlang-questions mailing list