Sunday, April 22, 2007

Starting the Erlang Debugger

A comment from 'tobbe' on PragDave's blog entry regarding extending his erlang tutorial example:

Just for the fun of it, try the debugger:
(if you've got the right gui libs. installed)

1> c(ranks, [debug_info]).
2> im(). % a window should pop up, ignore it for now...
3> ii(ranks).
4> iaa([init]).
5> ranks:fetch_in_parallel().

After the last command, you should get yet another window.
From here, single step, set break-points, study varable contents, etc.
Note: the first windows shows the processes running the actual code,
double-click on a line to attach yourself to that particual process
and you'll get the second window.

And this is what it looks like on my MacBook Pro :

0 comments: