Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?

Debugging Erlang Applications In Real Time

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
cd eper



Basic Example

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment