Debugging in elixir


➜ iex -S mix
Erlang/OTP 25 [erts-13.2] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit] [dtrace]

iex(1)> :debugger.start()
{:ok, #PID<0.505.0>}

iex(2)> :int.ni(Rudder.Pipeline)
{:module, Rudder.Pipeline}

iex(3)> :int.break(Rudder.Pipeline, 45)
:ok

:debugger.start() starts a GUI for debugging.
:int.ni sets up the module for debugging. While :int.break adds breakpoint at a particular line number in a particular module. After this, you would be able to step through the code in the GUI and inspect variables etc.