Reid Draper @reiddraper
We'll be using a tool called redbug, which is an abstraction and safety layer of Erlang's built-in dbg tracing facilities. You can follow along at home:
git clone https://github.com/massemanet/eper
cd eper
make
redbug:help().
In one terminal
erl -pa ebin -sname foo@
In another:
erl -pa ebin -sname bar@
In foo
:
net_adm:ping('bar@reid-11'). %% replace your node name
Let's start with something fancy, tracing a function:
redbug:start("os:timestamp -> return", [{msgs, 10}, {time, 10 * 1000}, {target, 'bar@reid-11'}]).
In the other console:
os:timestamp().