counter.erl example from "Concurrent Programming in ERLANG" - debugging
Wes James
comptekki@REDACTED
Tue Mar 15 17:13:52 CET 2011
On Mon, Mar 14, 2011 at 3:33 PM, Wes James <comptekki@REDACTED> wrote:
> I run the counter.erl in the shell - Pid=counter:start(). Then ran
> counter:value(Pid) - returns 0. I wanted to see how this works in the
> debugger so I run (after starting new shell or f() ):
>
>
> c(counter,[debug_info]).
> im().
> ii(counter).
> iaa([init]).
>
>
> then Pid=counter:start().
>
> It then runs through some of the code lines in the debugger. I then
> run counter:value(Pid), but then it just freezes after I press enter.
> Can the debugger not debug this?
>
> got out of the shell then back in and just ran up to
> counter:value(Pid) again and it returns 0. So the debugger is not
> liking something.
>
Never mind, it works fine. The debug window was hiding behind an
inactive debug window.
-wes
More information about the erlang-questions
mailing list