Skip to content

Instantly share code, notes, and snippets.

@leandrocp
Last active May 17, 2018 11:20
Show Gist options
  • Save leandrocp/6a29ade9ccef87a59589e15a75a0ed64 to your computer and use it in GitHub Desktop.
Save leandrocp/6a29ade9ccef87a59589e15a75a0ed64 to your computer and use it in GitHub Desktop.
# given that you have this module
defmodule MyApp.Example do
def sum(x, y) do
x + y
end
end
# start a new iex session
$ iex -S mix
# then start :debugger
iex> :debugger.start()
# prepare your module for debugging
iex> :int.ni(MyApp.Example)
# set a break point at the line you want to capture
iex> :int.break(MyApp.Example, 3)
# and finally call your function
iex> MyApp.Example.sum(1,2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment