[erlang-questions] Erlang tracing

Lukas Larsson <>
Mon Sep 21 19:10:59 CEST 2015


On Mon, Sep 21, 2015 at 5:58 PM, Fred Hebert <> wrote:

> One thing I think would be nifty is to be able to trace the output of a
> function, but only if it matches a given pattern, rather than only being
> able to do it with the function arguments.
>

Hmm, I hadn't thought about wanting to do that....  I'll add it to my list
of things to think about. I've never looked at how the return_trace stuff
is implemented, so could either be very simple to do, or very very hard...

In my "let's handwave away all complexity", a thing I'd love to be able to
> do is know where a function call comes from. Too often I can trace the
> function call that fails or goes bad, but I have no manageable way to trace
> or extract which function call sits above it in the call stack (even if LCO
> makes it less useful).
>

Do you mean something like what is possible today with {message,{caller}}
and/or {message,{process_dump}}? i.e. dbg:tracer(),dbg:p(all,c),
dbg:tp(lists,map, [{'_',[],[{message,{caller}}]}]).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150921/88c87845/attachment.html>


More information about the erlang-questions mailing list