RESOLVED FIXED270607
Web Inspector: Console cleared unexpectedly when inspector reopens
https://bugs.webkit.org/show_bug.cgi?id=270607
Summary Web Inspector: Console cleared unexpectedly when inspector reopens
Qianlang Chen
Reported 2024-03-06 16:00:03 PST
Created attachment 470215 [details] Video demo reproducing this bug If you close and reopen the inspector's Console tab, the messages are kept if only one scope bar item (AKA message level filter) is selected. If there are two or more selections, reopening the console auto clears ALL messages (selected or not). To reproduce: 1. Go to about:blank, open inspector, and go to the Console tab 2. Run the following script: console.error('my error'); console.warn('my warn'); console.log('my log'); console.info('my info'); console.debug('my debug'); 3. Near the top of the inspector, select the scope bar item "Errors" (or any other item, but only one item) 4. Close the inspector and open it again 5. Select scope "All" 6. Observe that the messages you logged in step 2 are still there (let's call this "behavior A") 7. While holding the Command key, select scopes "Errors" and "Warnings" (or any other set of two or more items) 8. Close the inspector and open it again 9. Select scope "All", and observe that the messages are all gone (let's call this "behavior B") It's unclear whether behavior A or B is correct. Though, both Chrome and Firefox consistently present behavior A. See attached for a video demo reproducing this bug (`console-cleared-unexpectedly.mov`). One thing to note is that if the messages are produced while the console is closed, those messages do always show up (with the correct filters applied) for any combination of selected scopes upon last close. So at least that's good.
Attachments
Video demo reproducing this bug (4.93 MB, video/quicktime)
2024-03-06 16:00 PST, Qianlang Chen
no flags
Radar WebKit Bug Importer
Comment 1 2024-03-06 16:00:59 PST
Qianlang Chen
Comment 2 2024-03-19 17:40:25 PDT
Update! This bug does NOT happen when you have multiple filters applied. It happens when you open the inspector THE SECOND TIME. That is, - If the message showed up while console is open, the first time you close and re-open the inspector, the message is there, and the second time you close and re-open, the message is gone. - If the message was created while the console is closed (either the inspector is closed or the inspector is open but you're viewing different tab), the first time you open the console, the message is there, and when you close and re-open the inspector, the message is gone. Very sneaky.
EWS
Comment 3 2024-03-26 12:21:30 PDT
Committed 276705@main (fd9d7ea0bf6b): <https://commits.webkit.org/276705@main> Reviewed commits have been landed. Closing PR #26281 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.