Erlang DBG and the Trace BIF Tamas Nagy This tutorial gives insight in the less known trace tools and mechanisms available in Erlang. Its contents are up to date with all the latest features in the language, including the trace BIF alongside the so ugly, yet so useful match specifications. Its target audience consists of programmers, testers and support engineers with a few months Erlang experience. OTP knowledge is not a requirement. Time permitting, the course contains hand on exercises (or demos) where users write their own tools to test, monitor and profile the system, or adapt existing tools to a set of predefined requirements. Trace Bifs Trace bifs provide a low level trace mechanism. The fact that it can be used with out trace compiling the code makes it useful when tracing garbage collecting, memory consumption, message passing, and other process activities including local and global function calls. This section looks at how to activate and deactivate the different trace flags as well as turning them on for different processes, modules and functions. The understanding of the trace and trace_pattern bifs are important as they give an insight into what exactly is available for low level debugging and are used to build many of the existing tools. The dbg Tool The dbg tool is a text based debugger providing a friendly interface to the trace bifs with small impacts on system performance. This section introduces the tool and covers how this tool can be used in a distributed environment or how the output can be redirected on other nodes, log files, ports and sockets. Match Specifications This section covers match specifications, an Erlang term providing a low level mechanism which will match and test the arguments passed to traced function calls. If the match is successful, a trace message is issued along side possible user defined events. These match specifications are very powerful in that they allow conditional tracing on specific function calls based on the arguments with out having to recompile or change the code. Due to its neglectable impact on system performance, if used with care, match specifications can be used to detect bugs on live systems. Delegates should come to the workshop with Erlang installed on their machine. ------------------------------------------------------------------------ *Bio:* Tamas Nagy received his master's degree in Computer Science in 2007 from Eotvos Lorand University, Hungary. Both his bachelor and master's thesis were based around Erlang and refactoring. He was involved in the initial phases of RefactorErl, a project, a refactoring tool for Erlang, and through an exchange program, worked with Wrangler at the University of Kent. He is passionate about Erlang, having been introduced to it during his university studies more than three years ago. As a result of this passion, he has had the opportunity to experiment his teaching techniques on computer science students for 2 years. After joining the Erlang Training and Consulting in early 2008, he has been involved in various commercial Erlang related projects, ranging from configuration management to mobile email gateways. He lives in London with his wife Aniko and cat Rasputin.