Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elixir: IEx.pry error: IEx shell running?

Tags:

elixir

On Elixir Sips 33 - Pry:

While I'm trying to use IEx.pry, I have something basic like this:

require IEx

defmodule IexPryTest do

  def add(a, b) do
    c = a + b
    IEx.pry
    c
  end
end

I get this Pry error:

iex(1)> IexPryTest.add(1, 2)
Cannot pry #PID<0.88.0> at lib/iex_pry_test.ex:24. Is an IEx shell running?

I think iex is running, since thats where I'm running this from.

I'm on Windows 8.1 if that makes any difference.

Any suggestions to get Pry running? Thanks.

like image 757
seadynamic8 Avatar asked Feb 28 '26 00:02

seadynamic8


1 Answers

I just tried on a Windows 7 VM from the standard command prompt, and this definitely seems like a bug. Perhaps you could open an issue on elixir-lang GitHub?

However, when starting the GUI shell with iex --werl, pry worked. Can you try that one?

like image 102
sasajuric Avatar answered Mar 02 '26 15:03

sasajuric



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!