Inspecting a Socket After a handle_event("submit")

 def handle_event("submit", %{"workspace" => params}, socket) do
    send_update(__MODULE__, id: socket.assigns.form_name, update: :toggle_submit, value: true)

How can I inspect the Socket in iex after i have clicked the submit button?

Are you already running phx server using

iex -S mix phx.server ?

Maybe you can just add

def handle_event(“submit”, %{“workspace” => params}, socket) do
    # Debug here
    dbg(socket)
  
    # Or using pipe
    send_update(MODULE, id: socket.assigns.form_name, update: :toggle_submit, value: true) |> dbg
1 Like

thanks so much

1 Like