# Programming Phoenix LiveView B9.0: Describe usage of client-side liveSocket debugging functions (p. 138)

**URL:** <https://forum.devtalk.com/t/programming-phoenix-liveview-b9-0-describe-usage-of-client-side-livesocket-debugging-functions-p-138/115046>\
**Category:** PragProg Customers\
**Tags:** book-programming-phoenix-liveview, suggestion\
**Created:** [2 July 2023 21:40 UTC](https://forum.devtalk.com/t/programming-phoenix-liveview-b9-0-describe-usage-of-client-side-livesocket-debugging-functions-p-138/115046 "2023-07-02T21:40:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arcanemachine](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/a/e0b2c6/32.png) [@arcanemachine](https://forum.devtalk.com/u/arcanemachine)\
**Post date:** [2 July 2023 21:40 UTC](https://forum.devtalk.com/t/programming-phoenix-liveview-b9-0-describe-usage-of-client-side-livesocket-debugging-functions-p-138/115046/1 "2023-07-02T21:40:14Z")

</div>

On page 138, `:timer.sleep(1000)` is used in the server-side code to simulate latency. This would be a great place to introduce the client-side liveSocket debugging function `liveSocket.enableLatencySim()`. The developer can achieve the same latency by running `liveSocket.enableLatencySim(1000)` in the browser console, which allows them to avoid unnecessarily mucking with their server-side code. (I mean, who’s never left a breakpoint in their code by accident? Definitely not me…)

Then, to reset it, you could describe the similar usage of `liveSocket.disableLatencySim()`.

Also, a link to the docs never hurts: [JavaScript interoperability — Phoenix LiveView v0.19.3](https://hexdocs.pm/phoenix_live_view/js-interop.html#simulating-latency)

---

<div class="post-metadata">

**Author:** ![SophieDeBenedetto](https://forum.devtalk.com/user_avatar/forum.devtalk.com/sophiedebenedetto/32/2521_2.png) [@SophieDeBenedetto](https://forum.devtalk.com/u/SophieDeBenedetto)\
**Post date:** [14 December 2024 20:40 UTC](https://forum.devtalk.com/t/programming-phoenix-liveview-b9-0-describe-usage-of-client-side-livesocket-debugging-functions-p-138/115046/2 "2024-12-14T20:40:53Z")

</div>

Thanks for this suggestion! We’re going to incorporate it into the next release.
