Guest User

Untitled

a guest
May 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. # given that you have this module
  2. defmodule MyApp.Example do
  3. def sum(x, y) do
  4. x + y
  5. end
  6. end
  7.  
  8. # start a new iex session
  9. $ iex -S mix
  10.  
  11. # then start :debugger
  12. iex> :debugger.start()
  13.  
  14. # prepare your module for debugging
  15. iex> :int.ni(MyApp.Example)
  16.  
  17. # set a break point at the line you want to capture
  18. iex> :int.break(MyApp.Example, 3)
  19.  
  20. # and finally call your function
  21. iex> MyApp.Example.sum(1,2)
Add Comment
Please, Sign In to add comment