[erlang-questions] tracing function calls in a given process
Vlad Dumitrescu
vladdu55@REDACTED
Wed Jul 27 21:16:20 CEST 2011
Hi,
On Wed, Jul 27, 2011 at 21:00, Joel Reymont <joelr1@REDACTED> wrote:
> What is the right dbg incarnation for tracing functions calls within a given process?
>
> There's
> dbg:p(Pid, [all]).
> to trace all messages in a process. There's
> dbg:tpl(M, F, dbg:fun2ms(fun(_) -> return_trace() end)),
> to trace all calls to a function in a given module, or
> dbg:tpl(M, dbg:fun2ms(fun(_) -> return_trace() end)),
> to trace all function calls in a module.
> How do I combine the above, though?
dbg:p(Pid, [all]).
will enable all tracing, messages, function calls, the works. Use
dbg:p(Pid, [c]).
to just trace function calls.
http://www.erlang.org/doc/man/dbg.html#p-2 will give you all the
details.
regards,
Vlad
More information about the erlang-questions
mailing list