Observer in iex -S mix

Is there a known issue with :observer with Elixir 1.15 that I’m unaware of? I’ve added :observer to :extra_applications but it gives this error:

iex(1)> :observer.start
** (UndefinedFunctionError) function :wx_object.start/3 is undefined (module :wx_object is not available)
    :wx_object.start(:observer_wx, [], [])
    (observer 2.15.1) observer_wx.erl:70: :observer_wx.start/0
    iex:1: (file)

If I start just iex (as opposed to iex -S mix), it works just fine. Is there something else I must add to the mix config?

1 Like

:observer is a module in the :runtime_tools application. You’d need to add the latter.

works for me

extra_applications: [:logger, :wx, :observer, :runtime_tools]
5 Likes

Thanks! I had :runtime_tools but missed :wx, it works!

If you don’t want to modify your application you could also run this in IEx:

Mix.ensure_application!(:wx)
Mix.ensure_application!(:runtime_tools)
Mix.ensure_application!(:observer)
:observer.start()
12 Likes

I can confirm that, from Erlang/OTP 27, only:

Mix.ensure_application!(:observer)
:observer.start()

is required.

9 Likes