Created attachment 470437 [details] Demo: suggestion of myVariable does not show up before re-open 1. On fresh launch of Safari, open inspector's console 2. Run myVariable = 3 3. Type my => No suggestions show up 4. Close and re-open the inspector. Go to console 5. Type my => Suggestion "myVariable" now shows up Expected behavior: myVariable should show up as a suggestion after step 3. See attached video demo.
<rdar://problem/125035133>
Similar to new variables created while the console is open not being suggested immediately, if you reload the page while the console is open, the old variables technically get cleared by are still included in the suggestions. Try this: 1. Open inspector's console 2. Run myVariable = 3 3. Close and reopen the inspector. Go to console 4. Reload the page with the console still open 5. Type my => See that myVariable is still being suggested, but if you follow the suggestion and run `myVariable`, you get a ReferenceError as expected This is hinting at the console's suggestion list not being in sync with the code's state. (And it only fetches the up-to-date list of suggestion when inspector launches?)
Committed 277261@main (5c6736f3f9ad): <https://commits.webkit.org/277261@main> Reviewed commits have been landed. Closing PR #26632 and removing active labels.