Hopefully a very simple question… I am troubleshooting and would like to see all the contents of a given socket using IO.inspect()
. I know about using limit: :infinity
to show everything in maps, lists, etc without truncation but that doesn’t seem to work with sockets. The printing is truncated with ...
Another weird thing is the socket is printed as #Phoenix.LiveView.Socket<>
instead of %Phoenix.LiveView.Socket{}
like a normal struct. What is a #Name<>
data structure and how is it different than a struct? Couldn’t find where in the docs it is mentioned.
IO.inspect(socket, limit: :infinity)
returns this truncated result:
#Phoenix.LiveView.Socket<
assigns: %{},
changed: %{
changeset: true,
email: true,
field_errors: true,
form_error: true,
...
},
endpoint: MyAppWeb.Endpoint,
id: "phx-4dWXZ4j7",
parent_pid: nil,
view: MyAppWeb.RegistrationLive,
...
>