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
I am trying deploy phoenix app to cloud run every thing works locally fine using public IP but when i deployed to cloud run the app could...
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
We have been stuck on this for a few days now and I am really not sure what could be missing. I can get chromic_pdf to work perfectly fin...
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
I don’t get an error directly related to Paraxial, but removing that dependency stopped the crash.
Has anyone experienced a similar issu...
New
I’ve been unable to deploy apps for over a week now due to the following error. It all started when Github has issues with GitHub Actions...
New
The Issue of Enums in Elixir
Elixir doesn’t have a native enum construct, so we usually rely on atoms, strings, or macros to represent na...
New
Other popular topics
Hello, I get Persian date from my client and convert it to normal calendar like this:
def jalali_string_to_miladi_english_number(persi...
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
What is the idiomatic way of matching for not nil in Elixir?
E.g.,
First way:
defp halt_if_not_signed_in(conn, signed_in_account) when...
New
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
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
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: )
Hello all, this is ...
New
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum.
...
New
I have a super simple question about elixir - how would I take a file like this
foo bar baz
and output a new file that enumerates th...
New
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New







