<p>I always use this, i call it at start, then it trace every call on the module</p>
<p> open_tracer(Module) -><br>
     dbg:tracer(),<br>
     dbg:p(all, [call]),<br>
     dbg:tpl(Module, [{'_', [], [{return_trace}]}]).<br>
 </p>
<div class="gmail_quote">ÔÚ 2012-10-27 °øÍí6:16£¬"Alex Shneyderman" <<a href="mailto:a.shneyderman@gmail.com">a.shneyderman@gmail.com</a>>дµÀ£º<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am trying to use dbg. Here is what I did:<br>
<br>
Erlang R15B (erts-5.9) [source] [64-bit] [smp:8:8] [async-threads:0]<br>
[hipe] [kernel-poll:false]<br>
<br>
Eshell V5.9  (abort with ^G)<br>
1> compile:file("fib.erl",[debug_info]).<br>
{ok,fib}<br>
2> dbg:tracer().<br>
{ok,<0.38.0>}<br>
3> dbg:tpl(fib,c).<br>
{ok,[{matched,nonode@nohost,3},{saved,c}]}<br>
4> fib:fib(21).<br>
231<br>
5> dbg:ltp().<br>
c: [{'_',[],[{message,{caller}}]}]<br>
caller_exception_trace: cx<br>
caller_trace: c<br>
cx: [{'_',[],[{exception_trace},{message,{caller}}]}]<br>
exception_trace: x<br>
x: [{'_',[],[{exception_trace}]}]<br>
ok<br>
<br>
Or something is amiss with my code, dbg or something else? Any ideas?<br>
Or can I even trace by module. I tried to trace by process and that worked<br>
fine.<br>
<br>
Cheers,<br>
Alex.<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>