How to start debugging a web socket connection?

I use the Endpoint to sign my token, not the socket… not sure it changes something… Those are helpers I am using to sign and verify token.

  def sign(user), do: Phoenix.Token.sign(Endpoint, @salt, %{id: user.id, name: user.name})

  def verify_token(token), do: Phoenix.Token.verify(Endpoint, @salt, token, max_age: @max_age)

Also I am not sure it is efficient to make db query with token… it should contain your identity already.