mooreryan
Mix test --breakpoints issue: "Cannot pry #PID<...>. Is an IEx shell running?"
In a project I’m working on, I cannot get tests with breakpoints or pry working. Here is an example in a new mix project.
Create a fresh project:
$ mix new breakpoints_issue
$ cd breakpoints_issue
Try to run tests with breakpoints:
$ iex -S mix test --breakpoints
Erlang/OTP 28 [erts-16.0.2] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]
Compiling 1 file (.ex)
Generated breakpoints_issue app
Running ExUnit with seed: 780637, max_cases: 20
Cannot pry #PID<0.168.0> at test/breakpoints_issue_test.exs:6. Is an IEx shell running?
..
Finished in 0.01 seconds (0.00s async, 0.01s sync)
1 doctest, 1 test, 0 failures
Interactive Elixir (1.18.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>
Additionally, regular pry doesn’t seem to be working either. First, I add a dbg() call to the autogenerated hello function:
defmodule BreakpointsIssue do
def hello do
:world |> dbg()
end
end
Then, run iex:
$ iex --dbg pry -S mix
Erlang/OTP 28 [erts-16.0.2] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]
Compiling 1 file (.ex)
Generated breakpoints_issue app
Interactive Elixir (1.18.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> BreakpointsIssue.hello
Cannot pry #PID<0.162.0> at BreakpointsIssue.hello/0 (lib/breakpoints_issue.ex:16). Is an IEx shell running?
:world #=> :world
:world
iex(2)> whereami
Pry session is not currently enabled
```
Still seems not to work.
Am I missing something here?
(I have Elixir installed with asdf, and OS is MacOS 15.6.1 (arm).)
Marked As Solved
josevalim
Creator of Elixir
It is a known issue and it has been fixed already. It is pending on a new 1.19 release candidate.
3
Also Liked
mooreryan
Yes it does work with 27. Here is the specific working version:
Erlang/OTP 27 [erts-15.2.7.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]
Elixir 1.18.4 (compiled with Erlang/OTP 27)
1
Popular in Troubleshooting
Hello everyone,
I’m working on a blockchain project in Elixir and I’m implementing some of the core cryptography in a Rust NIF using Rus...
New
Hi!
I am trying to pinpoint why my project has issue on incremental compilation when running tests in elixir 1.19.0-rc.0-otp-26
I am ru...
New
I have installed it on Phoenix 1.8.1 (without authentication or other packages and got 2 problems).
I had to set up things manually the ...
New
In a project I’m working on, I cannot get tests with breakpoints or pry working. Here is an example in a new mix project.
Create a fresh...
New
I tried to learn Elixir a few years ago and stopped. I am trying again.
In the code below I have a GenServer that is started by a Superv...
New
Hi All,
I am bumping into a weird issue with an umbrella app while upgrading to latest Elixir 1.19.x + otp28.
A couple apps in the umbr...
New
Hi everyone.
I’m trying to setup a small cluster with three nodes. I’m using libcluster as I have before. But my nodes doesn’t have a us...
New
Hello,
I’m trying to upgrade a pretty large project from Elixir 1.18.4 to Elixir 1.19.1 (1321 modules), but seeing some compiler warning...
New
Is there any way to go from a float 1.0 to 1.00 while retaining the float() type?
New
Hey,
I’ve got a project with several path dependencies. Some are phoenix apps, but this likely isn’t relevant.
I don’t fully understand...
New
Other popular topics
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Hi! May someone helps me, please!
I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
15:22:35.803 [error] gen_event {lager_file_backend...
New
Hello!
Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
Hi folks,
Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
New
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
Hello everybody,
usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
by Lance Halvorsen
Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
New







