elixir - How can I use IEx.pry without mix -
i know can breakpoint using iex.pry
when run application iex -s mix
.
i working on elixir exercises not use mix. run using elixir myfile.exs
.
how can run file using iex can use iex.pry
breakpoints inside application?
edit: here files:
# hello_world.exs defmodule helloworld @doc """ greets user name, or saying "hello, world!" if no name given. """ @spec hello(string.t) :: string.t def hello(name \\ "world") "hello, #{name}!" end end # hello_world_test.exs if !system.get_env("exercism_test_examples") code.load_file("hello_world.exs", __dir__) end exunit.start exunit.configure exclude: :pending, trace: true defmodule helloworldtest use exunit.case test "says hello no name" assert helloworld.hello() == "hello, world!" end end
outputs:
➜ hello-world elixir hello_world_test.exs excluding tags: [:pending] helloworldtest * test says hello no name (0.00ms) finished in 0.03 seconds (0.03s on load, 0.00s on tests) 1 test, 0 failures randomized seed 530992
and
➜ hello-world iex hello_world_test.exs erlang/otp 19 [erts-8.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] interactive elixir (1.4.2) - press ctrl+c exit (type h() enter help) iex(1)>
Comments
Post a Comment