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

Issue 797918 link

Starred by 4 users

Issue metadata

Status: Duplicate
Merged: issue 658525
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Feature



Sign in to add a comment

Console handles display of large strings poorly

Reported by james.br...@gmail.com, Dec 28 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/63.0.3239.84 Chrome/63.0.3239.84 Safari/537.36

Steps to reproduce the problem:
1. Write a very large string (hundreds of KB) to the console with `console.log` / `console.error` etc
2. Watch the whole browser become unresponsive for seconds at a time

What is the expected behavior?
If a string is too large to display without a negative impact on performance, hide / truncate it by default

What went wrong?
The entire string is displayed in the console without regard for its length.

Did this work before? No 

Chrome version: 63.0.3239.84  Channel: stable
OS Version: Ubuntu 16.04
Flash Version: 

This is not exactly the same request as #240682, but similar in that I'm asking the dev tools to sanity-check what's being sent to the console.  I would say there are three cases to consider:

1. String fits on a few (20? 40?) lines: just display it
2. String would fill several screens and might take more than a second to render: render the first 20/40/etc lines, hide the rest behind a "show all" link/button
3. String is so huge it might have a significant impact on browser memory (limit could be configurable?): load X bytes, treat as in #2

Also, please don't tell me to "just stop logging large strings", this is output from a library I don't have direct control over.  As stated in #240682 4+ years ago (!), Firefox already does something like this and it's a feature worth stealing.
 
Labels: Needs-Triage-M63
Cc: sc00335...@techmahindra.com
Labels: -Type-Bug M-65 Triaged-ET OS-Mac OS-Windows Type-Feature
Status: Untriaged (was: Unconfirmed)
As per comment#0 this seems to be a feature request. Hence marking as Untriaged for further inputs on this.

Thanks!
Owner: l...@chromium.org
Status: Assigned (was: Untriaged)
I think this has been addressed in latest Canary already. Over to Erik to confirm.

Comment 4 by l...@chromium.org, Dec 31 2017

Mergedinto: 658525
Status: Duplicate (was: Assigned)
Yes, this issue was recently addressed (  https://crbug.com/658525  ).  Thanks for the report, the fix we landed on Canary includes showing a truncated string along with a 'Show more' button and 'Copy' button.  It is currently part of M65, so 2 releases from now.

Sign in to add a comment