View JavaScript variable values in real-time?

Greetings!

First:
My apologies if this has been asked a zillion times before. I have diligently searched the web - and these fora - and have not found an answer.

Question:
Is there a way to view/watch a JavaScript variable’s value in real-time?

Discussion:
All the research I have done so far returns the answer “No”. The development tools allow you to stop execution at particular points and then view the values and status of a whole host of things.

This is useful when the browser interaction is relatively static - click on something and something else happens, or type something in and it gets sent to the page.

My case involves a fluidly interactive application - controlling a remote device with a joystick. In my use-case, the values are primarily of interest while they’re changing - are they changing smoothly? What values are they constrained to?

Reading the static value of a particular button or joystick is pointless - it’s only interesting when they’re changing and knowing the rate of change, the smoothness of change, etc., is essential.

Now that the browser is becoming more interactive - games, immersive 3D, etc. - the ability to monitor a value as it is dynamically changing can be critical.

Is this possible? If so, how?

If this is NOT possible, would you folks please consider this for a future release, ASAP?

Thanks!

Jim “JR”

Hi @jharris1993,

I love the use cases of games and 3d spaces for monitoring state and input.

Chrome offers Live Expressions; which will execute a given expression repeatedly and provide the output. Have you tried those?

Inspired by this and trying to fit it in with existing tools, we actually have a contributor working on Live Watch Expressions. Debugger’s watch expressions right now only work when paused; and this would make them sample variable values even outside of paused state. Have you used Watchpoints before?