Debugger not found in iex -S mix

Hi,

I’m struggeling lately with the following issue. When running
iex I can run :debugger.start() without any problems. But when runnging iex -S mix I get the following error.

** (UndefinedFunctionError) function :debugger.start/0 is undefined (module :debugger is not available)
    :debugger.start()
    iex:2: (file)

Erlang Version:
26.2.1

Elixir Version:
1.15.6-otp-26

All installed via asdf.

Thanks for any suggestions.

With code path pruning in Elixir v1.15, any application not listed in your mix.exs is not available.

You can invoke this before:

iex> Mix.ensure_application!(:wx)
iex> Mix.ensure_application!(:debugger)

and then you should be able to start it. The :wx line won’t be necessary from Erlang/OTP 27+.

5 Likes

Thank you so much.

After adding the lines you suggested to my global iex config it works.

Kind Regards