WestKeys

WestKeys

Prob belongs under erlang but here goes

screenshot

> iex -S mix
Erlang/OTP 23 [erts-11.1.7] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]

Interactive Elixir (1.11.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :observer.start()
:ok

screenshot2

So far so good.

Observer docs indicate that to shutdown:

Module

observer

Exports

start() → ok
OTP R15B

Starts the Observer GUI. To stop the tool, close the window.

Say no more, so I go ahead and close the window, but the app remains on the dock.

Right click app on dock and click Quit, nothing happens.

Run :observer.start() again now that window is closed, nothing happens.

Force quit the erlang app, I get the following

iex(2)> 
13:28:01.365 [info]  SIGTERM received - shutting down

[1]    70302 killed     iex -S mix

Does this mean the erlang macOS app I see in dock is the actual iex session, not the observer? Or does it just mean that iex session process is linked to observer process?

Expected behavior behavior: on window close, tool gets stopped, app removed from dock, iex receives message and keeps running. Then, in same iex session, on second :observer.start() call, tool starts anew with app in dock.

Any ideas how to fix?

Showing Posts 1 to 10

LostKobrakai

LostKobrakai

My solution: Ignore the app icon. I‘ll go away once you close the iex session.

hauleth

hauleth

It is because of the architecture of macOS and the limitation that only root PID can create window. So in fact, closing the window didn’t closed the “application” (from the OS point of view) as the PID is still there (ERTS need to do some special-case handling for macOS to make it work).

WestKeys

WestKeys OP

What if I’d like to reopen :observer? Do I need to kill entire iex session?

Do you mean this is the case with other mac apps as well?

LostKobrakai

LostKobrakai

Just like there are many mac apps out there, which can run without having a window open so can the beam. Opening another observer will simply open a new observer window. Think of observer less like a separate app to your shell, but more like your shell is also a program rendering windows.

WestKeys

WestKeys OP

That’s the issue.

I am not able to reopen :observer window after having closed it

LostKobrakai

LostKobrakai

Ah, if I do rightclick → Quit then it doesn’t work for me as well. If I just close the observer window itself then I can open new windows. Seems like trying to quit the observer sends the mac application into cleanup mode, which then waits for iex to shut down, which never happens.

WestKeys

WestKeys OP

When

I cannot reopen it from shell, i.e. calling :observer.start() does not relaunch new window

hauleth

hauleth

What Erlang and macOS version you are at? Because it works for me.

WestKeys

WestKeys OP

Erlang/OTP 23 [erts-11.1.7]

macOS 11.2.1

JoseM111

JoseM111

I usually just do option + cmd + esc and force close it on my mac. Would be more practical if there was a command like the :observer.start( ) to exit out of the app properly.

— All posts loaded —

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
ChrisAmelia
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication): toke...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews