Console handles display of large strings poorly
Reported by
james.br...@gmail.com,
Dec 28 2017
|
||||
Issue descriptionUserAgent: 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.
,
Dec 29 2017
As per comment#0 this seems to be a feature request. Hence marking as Untriaged for further inputs on this. Thanks!
,
Dec 31 2017
I think this has been addressed in latest Canary already. Over to Erik to confirm.
,
Dec 31 2017
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 |
||||
Comment 1 by krajshree@chromium.org
, Dec 28 2017