Stratus3D

Software Engineering, Web Development and 3D Design

Guide to Tracing in Erlang

I’ve spent a lot of time debugging Elixir and Erlang applications over the last 5 years and decided to share what I’ve learned here. I started writing this blog post in April of 2017 and wasn’t inspired to finish it until watching Jeffery Utter’s Debugging Live Systems on the BEAM talk about a month ago. If you’d prefer a more concise presentation of Erlang tracing I suggest you watch that talk instead of reading this.

The first thing to understand when debugging Erlang applications is that Erlang’s concurrency greatly influences how debugging is done. While Erlang does have a traditional debugger its breakpoints pause process execution and may cause other processes in the system to crash if they are waiting on a message from the process that has been paused. Tracing on the other hand can be done under any circumstances and provides just as much information as a typical debugger. Tracing is also significantly more flexible than breakpoint debugging as it doesn’t interfere with process execution and can gather data from multiple processes at once.

The Meaning of Dbg Function Names

If you’ve ever used the dbg module in Erlang you’ve seen the esoteric names of the functions it exports. I recently watched Jeffery Utter’s excellent ElixirConf talk on Debugging Live Systems on the BEAM. In the talk when he covers the dbg:tpl/3 function he guesses that it might stand for "tuple". This reminded me that I didn’t know what most of the functions names in the dbg module stood for, even though I learned how to use dbg years ago. This got me searching for the meanings behind the dbg function names.

Review of the Alcatel GO Flip 2 and KaiOS

I’ve posted several off-topic blog posts this year and this is another one. Perhaps it is more relevant than the others as I list the issues with KaiOS software and the software limitations of my feature phone.

I’ve been using an Alcatel Go Flip 2 as my only phone for about a year and a half now. I feel like leaving my smartphone behind was the right choice and feel like my life is better as a result. I’ve published two previous articles on my move from a high end smartphone to a cheap feature phone. In this blog post I review the hardware and software I now use on my feature phone.