PhoenixLiveView traffic inspection

Hi,
When @chrismccord demoed PhoenixLiveView on Tuesday at ElixirConf.eu he showed some console logs with all the incoming traffic as part of the LiveView render life-cycle. Any idea how to see the same logs locally?

Thanks,
Adrian

1 Like

Hello :slight_smile:

I think that a regular web dev inspection tool like the ones from Chrome or Firefox can do the trick. If I am not mistaken, Chris has explained that the diff tool is able to compute what should be sent so that only what has actually changed in the DOM is transferred. For example when he was demonstrating the view with dynamic image resizing, only the width and height numbers were modified and I think (not sure) that only the new values are being sent. So I think that it remains the same for local or remote logs, and my best guess would be that the logging is done either through log-level settings or explicitly written in the app somehow. This is a complete shot in the dark answer so I might be wrong 100% but as far as the local/remote stuff is concerned, I think that it should probably be the same regardless of where the app is actually running as the rendering cycle should be identical.

I hope this helps you out somehow even though I am really not experienced with LiveView and cannot actually answer your question.

Best regards,

Igor

3 Likes

Thank you @Laymer, already tried the network inspector, but I didn’t saw the diff as in @chrismccord’s example, probably I’m not doing something right or there is some debug flag in PhoenixLiveView javascript library that I didn’t found yet :slight_smile:
Will keep looking and update this thread if I find it.

Thanks again for your reply.