Last active
May 17, 2018 11:20
-
-
Save leandrocp/6a29ade9ccef87a59589e15a75a0ed64 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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