Next Meetup

You Can Never Debug Code You Run, But You Can View Code the Debugger is Running
Can't make it to ElixirConf this year? You're in luck: Luke Imhoff will be giving a sneak preview of his ElixirConf talk at the meetup. Topic: Elixir supports various ways to debug code: printing with `IO.inspect`, prying with `IEx.pry`, or using more advanced OTP tools like `:debugger` and `:int`. Choosing when to use these different tools can be confusing, and understanding how they work can prove downright intimidating. Throughout this talk we'll peel back the covers on the more advanced debugging techniques and dissect exactly how each debugging tool can be used to examine our compiled code. None of debugging techniques leave your code the same as how it was running in production. Adding `IO` and `IEx.pry` calls obviously changes the code as you edit the source, but using the OTP debugger, either with `:debugger`, IntelliJ Elixir, or Elixir Language Server, or by adding new `break` points from the `IEx.pry` shell changes the module code being run. Luke Imhoff will show how each type of debugging changes the code by revealing how `IEx.pry` and `:debugger` are implemented. You'll see why sometimes the debuggers can't reproduce bugs because the modifications to make the code debuggable also subtly changes the execution of the code by looking at changes to the bytecode and AST. Although the modified code never exists as source, we can recover the Abstract Syntax Tree (AST) of either the Elixir quoted form or the Erlang Abstract Code from the Dbgi chunk, but the Dbgi chunk ASTs aren't terribly easy to read, so we can use tools to decompile the code and translate it to Elixir or Erlang modules. When looking at Dgbi code isn't enough, we can drop down to the Code chunk and look at the bytecode. The bytecode is a unique binary format, so once again we reach for for tools to render it, so instead of having to read machine code, we can read assembly. Looking at this bytecode also allows us to check if our high-level optimizations, such as module attribute reuse, compute variables once, and the order of pattern matching, have an impact on the code run by the VM, as unlike Dbgi, the Code chunk is actually loaded by the VM when running code without debugging. Speaker: Luke Imhoff has been writing Elixir since June 2014 and started writing IntelliJ Elixir in July 2014 after he couldn't find pre-existing support for Elixir for JetBrains IDEs he loved like Rubymine. While developing the plugin, he's found bugs in the native Elixir lexer and parser and the OTP debugger. He has 3 hex packages for JSONAPI: Alembic (validate format of JSONAPI), Calcinator (transport neutral JSONAPI, so you can use them for APIs and RPCs), and Retort (JSONAPI over JSONRPC over RabbitMQ for RPC). He hosts the Austin Elixir meetup on the 3rd Monday of each month. Location: Go to Capital Factory's 1st floor front desk (the big room with the robot head across from the hotel bar) and ask for the Austin Elixir meetup room (usually Wall-E on the first floor) and they'll point you in the right direction. You might want to stop by the front desk to get to the parking validation ticket before the meetup too. Parking: Capital Factory has validated parking: when you go to the 1st or 16th floor ask the front desk for a parking voucher. The parking voucher will let you park for 50% off from 5pm-10pm (so ~$15 instead of ~$30) in the Omni Hotel garage under Capital Factory. To get into the garage turn north on Brazos from 7th Street. The garage entrance is the first downward ramp on the right at 733 Brazos (Street view https://www.google.com/maps/@30.2689199,-97.740976,3a,75y,88.67h,84.37t/data=!3m6!1e1!3m4!1s6eYOcptw_oovfL-UUMEM1Q!2e0!7i13312!8i6656!6m1!1e1 ) . There is cheaper lot parking at 406 E 7th Street (https://goo.gl/maps/LseRL3TGKC32)

Capital Factory

701 Brazos St Fl 16 · Austin

    Past Meetups (45)

    What we're about

    This group is for those Interested in Elixir and/or Erlang and using them to develop distributed, fault-tolerant and reliable applications.

    Related sites: http://ElixirConf.com , Elixir-lang (http://Elixir-lang.org)

    Members (316)