I have a simple application that starts with the Supervisor. It periodically IO.puts some diagnostic information.
Is it possible to run the application with “iex -S mix” and retain a windowed command line within iex so that I can see clearly what commands I am typing and yet see the diagnostic information scroll by above?
Right now anything I type will be interleaved with the program output. Any help would be most appreciated.
No, the feature you are asking for is currently not supported in iex, and will probably need to be supported in erl first, as iex is mostly just a shallow wrapper around it.
I think I made the classic error of not explaining my problem but instead diving into an attempted (imagined) solution.
What I am really looking for is a clean way to interact with an already running system using iex — changing state variables for example. Maybe this needs to be in a separate window from the text output of that system. I think I’ve seen demos of Elixir with people doing that.
Well, you can start one node that just dumps your logs, and connect a remote shell.
Or you dump your logs to a file, not doing IO based calls at all, but Logger only. Start with iex -S mix and enjoy the clean shell, have a second terminal that does tail -f on the logfile(s).