Connection lost
Reconnecting. If you just saved something, check that it saved before trying again.
Server error
Reconnecting to the server. If you just saved something, check that it saved before trying again.
Limiting IO.inspect/2 output
0 comments
Are you using the function IO.inspect/2 for debugging? Are you getting overwhelmed with the outputs of large structs?
Try passing the :limit option. It limits the number of items shown for any collection.
{:ok,
socket
# some assigns
# ...
|> IO.inspect(label: "socket", limit: 5)}
# prints
socket: #Phoenix.LiveView.Socket<
id: "phx-GA-FuxsBgRdd1gOm",
endpoint: ElixirDropsWeb.Endpoint,
view: ElixirDropsWeb.DropLive.Index,
parent_pid: nil,
root_pid: nil,
...
>
# instead of a huge Phoenix.LiveView.Socket struct
Check other IO.inspect/2 options: https://hexdocs.pm/elixir/Inspect.Opts.html.