[erlang-questions] Question about how to better use the debugger

Roberto Aloi prof3ta@REDACTED
Sun Jun 23 15:08:27 CEST 2013


You could "trace" the function:

http://aloiroberto.wordpress.com/2009/02/23/tracing-erlang-functions/
 On 23 Jun 2013 15:05, "Yves S. Garret" <yoursurrogategod@REDACTED> wrote:

> Hi all,
>
> I've been trying to debug this method in module hello_world (just to
> learn):
> fac(0) ->
>   1;
> fac(N) when N > 0, is_integer(N) ->
>   N * fac(N - 1). % break-point
>
> I have a break-point on the last line (where the comment is).  Now, when I
> go
> through the motions of debugging, it works fine.  I can see N being
> decremented as
> it should be.  However, when I get to fac(0), the method instantly returns
> to the
> caller (the shell).  In other debuggers (Visual Studio C#, for example),
> I'd have the
> option to go back up the entire recursive tree and see the multiplication
> and the
> results of the multiplication being done.  Can I do the same here?  If so,
> what am I
> missing?  Is there a better strategy than what I'm using in debugging?
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130623/1e1bce7e/attachment.htm>


More information about the erlang-questions mailing list