New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 595208 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit 29 days ago
Closed: Apr 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

DevTools: Console - clear command non-functional when Preserve Log is enabled

Project Member Reported by jonathan.garbee@chromium.org, Mar 16 2016

Issue description

Chrome 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.
 
Components: Platform>DevTools

Comment 2 by caseq@chromium.org, Mar 16 2016

Owner: lushnikov@chromium.org
Status: Assigned (was: Untriaged)
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.


If a script calls it then that is an explicit action and should be obeyed.
Status: WontFix (was: Assigned)
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