-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
dap: add 'clipboard' support, and truncate a long value #2513
Conversation
- add 'clipboard' capability - apply a larger string limit for 'hover' and 'clipboard' context - truncate the string representation of compound (or pointer of compound) type variable
Would you like time to live with it and possibly change this before it gets submitted? |
I agree I think that these strings become unnecessarily long. When I was testing paging, this was the cause of some things being so slow that it was unusable for investigating the values. I would say drop it to ~100 (or even less) especially if it has children to expand to get more information. |
- use flag bits instead two bools for convertVariableWithOpts options. - lower the defaultMaxValueLen from 1k to 256.
Lowered the max limit to 256. Tried 128 and it broke some tests and some didn't look nice with 128 (e.g. slice of pointers to a compound type, ...) due to all the type info and len/cap info before the actual data. :-( |
I am not sure what you mean by "truncating information messages". I do agree that 1K is too long and something shorter is sufficient as long as it can be expanded further. 256 seems ok. I took a quick look at Python. They truncated my map at about 300+ characters, but it appeared to be based on the number of elements, not characters, and the output was {a, b, c, ...}, where entries were removed intelligently. But in any case, our number is in the similar ballpark. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, needs decision over the length constant.
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'll wait to merge until the length is sorted out and we get an ack from @polinasok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remind me please what actions in the vscode UI generate evaluate requests with "hover" and "clipboard" context. I know that right click + "Copy to Value" is "variabels" and using Debug Console is "repl".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description needs updating.
When the server declares the capability |
@polinasok It looks like you accidentally edited my comment instead of responding to it.
"hover" -> when you hover over the variable from the editor. |
PR description is updated. Seems like we all agreed on 256 for now. |
I believe this is only true when you hover over the code, not in the Variables section.
|
@hyangah Oh and sorry for editing the comment instead of replying. |
fyi @polinasok 'editor' refers to the main area where code/document is presented in vscode. 'views' or 'viewlets' are the sections presented in the side bar area. |
- add 'clipboard' capability - apply a larger string limit for 'hover' and 'clipboard' context - truncate the string representation of compound (or pointer of compound) type variable
Updates golang/vscode-go#1318
Fixes golang/vscode-go#1435
Updates golang/vscode-go/issues/126