DevTools: Console - clear command non-functional when Preserve Log is enabled |
|||
Issue descriptionChrome Version : 50.0.2661.18 What steps will reproduce the problem? 1. Open console and turn on preserve log 2. Type some commands 3. Try `clear()` command What is the expected result? Console to be cleared. What happens instead of that? Console remains unchanged and clear returns nothing/undefined. User report: https://stackoverflow.com/questions/36013778/google-chrome-dev-tools-console-undefined-message-upon-typing-the-clear-func Certainly seems like a bug to me. We *should* clear the console upon the developer request. It is the equivalent of pressing the "Clear" button in the toolbar (which does work when the log setting is on.) Preserve log should only affect the automatic clearing between page loads (as the tooltip states.) Preventing clearing does not seem to be intended.
,
Mar 16 2016
,
Apr 2 2016
What if a page runs the console.clear(); command from a script on it? So the console would be cleared between page loads too. Though this is not a very common scenario still it must be taken into consideration as a possibility.
,
Apr 2 2016
If a script calls it then that is an explicit action and should be obeyed.
,
Apr 11 2016
The "preserve log" option is implemented on the front-end, and it basically says "ignore messagesCleared events from back-end". This behavior is an unfortunate implication of this implementation. I would agree that this is a bug. However, fixing it in the right way will complicate the system, which is not a good trade-off given the minority of the issue. |
|||
►
Sign in to add a comment |
|||
Comment 1 by jonathan.garbee@chromium.org
, Mar 16 2016