<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Alex -</div><div><br></div><div>I'd recommend taking a look at the redbug tool.  It provides nice features for tracing. (<span style="font-family: '.HelveticaNeueUI'; font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-text-size-adjust: none; "><a href="https://github.com/massemanet/eper/blob/master/src/redbug.erl">https://github.com/massemanet/eper/blob/master/src/redbug.erl</a>)</span><br><br>Joe N.</div><div><br>On 2012/10/28, at 0:24, Alex Shneyderman <<a href="mailto:a.shneyderman@gmail.com">a.shneyderman@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><span>(one more time to the list):</span><br><span></span><br><span>great this works!</span><br><span></span><br><span>Is there any way to redirect traces to a file?  I mean with</span><br><span>specialized handler ...</span><br><span></span><br><span>On Sat, Oct 27, 2012 at 1:28 PM, Yang Liu <<a href="mailto:liuyang124846@gmail.com">liuyang124846@gmail.com</a>> wrote:</span><br><blockquote type="cite"><span>I always use this, i call it at start, then it trace every call on the</span><br></blockquote><blockquote type="cite"><span>module</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>open_tracer(Module) -></span><br></blockquote><blockquote type="cite"><span>     dbg:tracer(),</span><br></blockquote><blockquote type="cite"><span>     dbg:p(all, [call]),</span><br></blockquote><blockquote type="cite"><span>     dbg:tpl(Module, [{'_', [], [{return_trace}]}]).</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>在 2012-10-27 傍晚6:16,"Alex Shneyderman" <<a href="mailto:a.shneyderman@gmail.com">a.shneyderman@gmail.com</a>>写道:</span><br></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>I am trying to use dbg. Here is what I did:</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Erlang R15B (erts-5.9) [source] [64-bit] [smp:8:8] [async-threads:0]</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>[hipe] [kernel-poll:false]</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Eshell V5.9  (abort with ^G)</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>1> compile:file("fib.erl",[debug_info]).</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>{ok,fib}</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>2> dbg:tracer().</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>{ok,<0.38.0>}</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>3> dbg:tpl(fib,c).</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>{ok,[{matched,nonode@nohost,3},{saved,c}]}</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>4> fib:fib(21).</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>231</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>5> dbg:ltp().</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>c: [{'_',[],[{message,{caller}}]}]</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>caller_exception_trace: cx</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>caller_trace: c</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>cx: [{'_',[],[{exception_trace},{message,{caller}}]}]</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>exception_trace: x</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>x: [{'_',[],[{exception_trace}]}]</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>ok</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Or something is amiss with my code, dbg or something else? Any ideas?</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Or can I even trace by module. I tried to trace by process and that worked</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>fine.</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Cheers,</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Alex.</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>_______________________________________________</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>erlang-questions mailing list</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a></span><br></blockquote></blockquote><span>_______________________________________________</span><br><span>erlang-questions mailing list</span><br><span><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a></span><br><span><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a></span><br></div></blockquote></body></html>