How to Get State of Any GenServer in Elixir?

16 May 2019

To get state of any process in erlang/elixir use :sys.get_state/1

By name:

:sys.get_state(MyGenServer)

By pid:

:sys.get_state(pid)