The Chromium DevTools console has a feature called “live expressions” which allows developers to set expressions whose value will update real-time. This is very useful for debugging. In Chromium, the expressions are pinned at the top of the console, can be modified, and persist between sessions. For example, a developer can watch `document.activeElement` to see the focused element update real-time. I’ve personally used it while implementing different accessible components to ensure the various attributes and focus was being set on the different elements. I would love to have this feature in the Safari Web Inspector console. Here is the Chromium DevTools doc for the feature: https://developer.chrome.com/docs/devtools/console/live-expressions/
<rdar://problem/108262738>
Created attachment 471633 [details] example of watch expressions in devtools Just thinking out lougd. I wonder if keeping a watch expressions updated would be a goal toward this. For example, if I add as a Watch expresssion: document.body.getBoundingClientRect().width It displays as a result the width at the moment I added it, but it doesn't update it if I resize the window.