[erlang-questions] How do I trace by module name?

Alex Shneyderman <>
Sat Oct 27 12:16:03 CEST 2012


I am trying to use dbg. Here is what I did:

Erlang R15B (erts-5.9) [source] [64-bit] [smp:8:8] [async-threads:0]
[hipe] [kernel-poll:false]

Eshell V5.9  (abort with ^G)
1> compile:file("fib.erl",[debug_info]).
{ok,fib}
2> dbg:tracer().
{ok,<0.38.0>}
3> dbg:tpl(fib,c).
{ok,[{,3},{saved,c}]}
4> fib:fib(21).
231
5> dbg:ltp().
c: [{'_',[],[{message,{caller}}]}]
caller_exception_trace: cx
caller_trace: c
cx: [{'_',[],[{exception_trace},{message,{caller}}]}]
exception_trace: x
x: [{'_',[],[{exception_trace}]}]
ok

Or something is amiss with my code, dbg or something else? Any ideas?
Or can I even trace by module. I tried to trace by process and that worked
fine.

Cheers,
Alex.



More information about the erlang-questions mailing list