Better HN
topnewbestaskshowjobs
Log inSign up

red_bikeshed

73 karma · joined Dec 19, 2016 (9y ago) · 2 submissions

Submissions

comment 9y ago · link · parent

Well you have the basic IO.inspect/2 that you can use for "printf" debugging. It works really well with the pipe operator because it prints the structure and returns the structure itself not the string representation, so you can do stuff like:

some_function() |> IO.inspect |> some_other_function

Also with Elixir 1.5 (OTP 20) you can set breakpoints easily from within IEx.

There is also IEx.pry where you can set the "breakpoint" in the code itself.

There is the observer tool where you can inspect each process and see numerous information that can be useful. When in IEx just type :observer.start and try it out yourself.

I suggest reading Designing for Scalability with Erlang/OTP, particularly the chapter about Erlang/Elixir tracing facilities that can be really useful when debugging live production systems.

2.

Reducing the maximum latency of a bound buffer in Erlang(theerlangelist.com ↗)

165 points · by red_bikeshed · 9y ago · 26 comments