counter.erl example from "Concurrent Programming in ERLANG" - debugging

Wes James comptekki@REDACTED
Mon Mar 14 22:33:39 CET 2011


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.

thx,

-wes


More information about the erlang-questions mailing list