Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug console cannot print long values #154479

Closed
jrieken opened this issue Jul 8, 2022 · 3 comments
Closed

Debug console cannot print long values #154479

jrieken opened this issue Jul 8, 2022 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug papercut 🩸 A particularly annoying issue impacting someone on the team verified Verification succeeded
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Jul 8, 2022

Screenshot 2022-07-08 at 11 48 51

@jrieken jrieken added the papercut 🩸 A particularly annoying issue impacting someone on the team label Jul 8, 2022
@connor4312
Copy link
Member

We do limit the length of strings shown in the debug console; it shouldn't be the case that accidentally evaluating the wrong data can freeze the UI or extension host.

However note that you can copy(JSON.stringify(editorViewState, undefined, 4)) which will get the entire value

@jrieken
Copy link
Member Author

jrieken commented Jul 11, 2022

it shouldn't be the case that accidentally evaluating the wrong data can freeze the UI or extension host.

That makes sense but the limit seems very conservative. The same values printed in chrome dev tools without any issue.

@connor4312 connor4312 added the bug Issue identified by VS Code Team member as probable bug label Dec 5, 2022
@connor4312
Copy link
Member

connor4312 commented Dec 7, 2022

I'm not sure the release this was reported on, but shortly prior to this issue the budget was bumped to 100,000 characters from 1,000. Devtools limits their initial display to 5000 characters, so I think that's the case.

Playing around, it seems like numbers much above 100k seem to cause performance hangs, it 'costs' roughly 100ms per 100k characters on my macbook. However I now show message hinting that the user can still copy the value to their clipboard:

image

I think this should be sufficient for the issue; let me know if not

@connor4312 connor4312 added this to the December 2022 milestone Dec 7, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2023
@jrieken jrieken added the verified Verification succeeded label Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug papercut 🩸 A particularly annoying issue impacting someone on the team verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants