<div dir="ltr">There is no way around timeouts without modifying your code, what I try to say is:<div>write your code so that the timeouts are macros and infinity when debug compiled.</div><div><br></div><div>Something like this (untested):</div><div><br></div><div>-ifdef(DEBUG).</div><div>-define(TIMEOUT(TIME), inifinity).</div><div>-else.</div><div>-define(TIMEOUT(TIME), (TIME)).</div><div>-endif.</div><div><br></div><div><br></div><div>fetch(Data) -></div><div> gen_server:call(server, {Fetch,Data}, ?TIMEOUT(5000)).</div><div><br></div><div>or</div><div><br></div><div>receive Msg -> do_something(Msg)</div><div>after ?TIMEOUT(5000) -> timeout</div><div>end.</div><div><br></div><div>/Dan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 25, 2014 at 8:47 PM, Matthieu Tourne <span dir="ltr"><<a href="mailto:matthieu.tourne@gmail.com" target="_blank">matthieu.tourne@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dan, could you go a little bit into details how you would get around to do this ? Again, very new to the Erlang world.<div><br></div><div>Imants, Thank you I already have this as my user_default.erl [1], but not exactly what I've been looking for.</div><div><br></div><div><br></div><div>[1] <a href="http://www.snookles.com/erlang/user_default.erl" target="_blank">http://www.snookles.com/erlang/user_default.erl</a><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 25, 2014 at 1:52 AM, Imants Cekusins <span dir="ltr"><<a href="mailto:imantc@gmail.com" target="_blank">imantc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Just in case: dbg functions allow filtering by module, function. </p>
<p dir="ltr">It is possible to trace errors only. Call args & return values are available too.</p>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>