Issue metadata
Sign in to add a comment
|
DevTools: response preview: copying the value of a stringified JSON is truncated
Reported by
a.mat...@synthace.com,
Aug 10 2017
|
||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 Steps to reproduce the problem: 1. open devTools > Network > [select any request] > Preview 2. find a value that is a stringified JSON, double-click on it and copy it 3. paste it somewhere else What is the expected behavior? it would either a) copy the full value - or b) notify that the value is too long and can't be copied What went wrong? it copies a truncated (!) value. Which breaks all the trust in copy-pasting values from the dev console Did this work before? Yes Chrome version: 59.0.3071.115 Channel: n/a OS Version: OS X 10.11.6 Flash Version: worked well about a week or two ago.
,
Dec 13 2017
,
Dec 20 2017
Thanks for the report. Property values in the JSON view should not be truncated today, but we do show a trimmed preview for collapsed object titles "{k1: v1, k2: v2,...}".
Could you please clarify exactly what you are selecting or provide an example case? I'm not sure I can reproduce this issue.
I'm going to
- http://echo.jsontest.com/insert-key-here/insert-value-here/ and replacing the value with a really long string
- Open DevTools Network tab
- Open the request preview, expand the object, and double click to select the value text
- Copies the entire value fine
,
Dec 20 2017
"... and replacing the value with a really long string" - do you do that directly in the url? As far as I know urls have a maximum length around 2000 characters. What I meant are responses where a JSON string would take up to 1-10MB. Sorry for not clarifying the definition of 'long'.
,
Dec 20 2017
Ah, that's why I was not able to repro, thanks. Looks like we truncate long strings to 10k characters, and double clicking to select will stop at the ... ellipsis boundary. For reference, the same root issue can be seen in Console with these steps - Evaluate a string in console "aaaaa\u2026bbbbb" - Double click the word to select all of it - Only the text before the (...) ellipsis is selected
,
Dec 21 2017
ok, first of all thank you for the explanation. Visually figuring out whether a field is longer than 10k characters (meaning it would have the ... at the end) is like an impossible task. Especially if the UI that shows it is mostly used for quick debugging procedures. I agree that it's reasonable to truncate long strings somewhere, be it 10k or 100k characters. But then it also seems reasonable: 1. to visually indicate whether the value is truncated down the line or not (... ellipsis kind of does that already but it appears at the end of the value which makes the visual cue useless) 2. if possible, making ... ellipsis always clickable so that the full value would be shown on demand. I assume it's how it works already (please correct me if I'm wrong)
,
Jun 4 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d96b9f46eafdd0145393b5fe3e188e9bedb2da72 commit d96b9f46eafdd0145393b5fe3e188e9bedb2da72 Author: Erik Luo <luoe@chromium.org> Date: Mon Jun 04 23:23:52 2018 DevTools: use expandable fragment for long Object property values Screenshot: https://imgur.com/a/FUh1E91 Bug: 754216 Change-Id: Id7f04637f85ad776e4c61b0cedf500351723342d Reviewed-on: https://chromium-review.googlesource.com/1081677 Commit-Queue: Erik Luo <luoe@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#564286} [modify] https://crrev.com/d96b9f46eafdd0145393b5fe3e188e9bedb2da72/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-truncate-long-messages-expected.txt [modify] https://crrev.com/d96b9f46eafdd0145393b5fe3e188e9bedb2da72/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-truncate-long-messages.js [modify] https://crrev.com/d96b9f46eafdd0145393b5fe3e188e9bedb2da72/third_party/blink/renderer/devtools/front_end/console/ConsoleViewMessage.js [modify] https://crrev.com/d96b9f46eafdd0145393b5fe3e188e9bedb2da72/third_party/blink/renderer/devtools/front_end/console/consoleView.css [modify] https://crrev.com/d96b9f46eafdd0145393b5fe3e188e9bedb2da72/third_party/blink/renderer/devtools/front_end/console_test_runner/ConsoleTestRunner.js [modify] https://crrev.com/d96b9f46eafdd0145393b5fe3e188e9bedb2da72/third_party/blink/renderer/devtools/front_end/object_ui/ObjectPropertiesSection.js [modify] https://crrev.com/d96b9f46eafdd0145393b5fe3e188e9bedb2da72/third_party/blink/renderer/devtools/front_end/ui/UIUtils.js [modify] https://crrev.com/d96b9f46eafdd0145393b5fe3e188e9bedb2da72/third_party/blink/renderer/devtools/front_end/ui/inspectorCommon.css
,
Jun 4 2018
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by kozyatinskiy@chromium.org
, Aug 10 2017Status: Assigned (was: Unconfirmed)