[erlang-questions] Weird behavior with the visual debugger.
Matthieu Tourne
matthieu.tourne@REDACTED
Mon Nov 24 22:23:30 CET 2014
I'm using Erlang/OTP 17 on Mac OS, and I'm seeing a weird behavior with the
debugger.
I'm pretty new to the Erlang world, so not sure what is expected or not ..
So here is what I'm doing :
$> ii(module_to_debug).
$> im().
This will launch the visual debugger with the module I want to debug.
I've been trying to do 2 different things :
1. Set up a break point in my code
I'm setting a break point, and setting up the option "Auto attach - On
Break".
My problem is that what I want to step through is behind a gen_server call,
and the whole thing times out before I can do any meaningful debugging.
Is there a way to prevent the timeouts *without* having to change the code
that does the call ?
2. Inspecting the call stack on exception
In this case I'm just setting the option "Auto attach - On Exit".
That is where the weirdest behaviors lies, upon reaching the exception I
get 2 blank debugger windows, one saying "State: uninterpreted" at the
bottom and the other one "Loading module..."
In my Erlang console I get the following message (which only ever happen if
I'm trying to attach the debugger this way) :
$> 13:08:38.300 [error] gen_server dbg_iserver terminated with reason: no
match of right hand value [] in dbg_iserver:handle_call/3 line 287
(I'm using lager, hence the formatting).
All subsequent calls to what leads to the exception behave weirdly :
** exception exit: {noproc,{gen_server,call,
[undefined,{get_meta,<0.14874.0>},infinity]}}
$> 13:20:22.337 [error] CRASH REPORT Process <0.14874.0> with 2 neighbours
exited with reason: no such process or port in call to
gen_server:call(undefined, {get_meta,<0.14874.0>}, infinity) in
gen_server:init_it/6 line 330
I'm not sure what I'm doing wrong here, or if there is a real problem.
If you can eventually point me to an article that explains how to make my
two possible workflows above work, that would be great too.
Thank you,
Matthieu
ps: Yes I already know "dbg:tracer(),dbg:p(all,c),dbg:tpl(ess_tcp, x)."
Which doesn't entirely solve my problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20141124/a1119f49/attachment.htm>
More information about the erlang-questions
mailing list