Hi
The following is a demonstration on how to debug using debugger. Of course, IO.inspect works. Where it does not.
defmodule Math do def add(a, b) do a + b end end
defmodule MathTest do # timeout: :infinity is needed as the exunit timeouts around 3 seconds @tag timeout: :infinity test ~c"test add" do :debugger.start() :int.ni(Math) # break_in take module, function, arity # module - Math # function - add # arity - 2 no of parameters :int.break_in(Math, :add, 2) end end
Top comments (0)