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

Long strings are cutoff when hovering over local value while debugging #22622

Closed
nicolehaugen opened this issue Mar 14, 2017 · 7 comments
Closed
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality release-notes Release notes issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@nicolehaugen
Copy link
Member

nicolehaugen commented Mar 14, 2017

  • VSCode Version: 1.11.0-insider
  • OS Version: Win 10

Steps to Reproduce:

This issue likely can be repro'ed with other types of projects, but I ran into this when working with node.js where you hover over a value during debugging that contains a large string.

For example, node.js's internal modules have methods that take the contents of an entire javascript file as a string parameter in order to compile it (such as VM.js's runInThisContext method) - if you attempt to hover over this parameter to see its value while debugging, you aren't able to see all of the javascript because it is cutoff and there isn't any ability to scroll within the window to see all of the javascript. This can be painful when trying to debug.

Below are basic steps to repro the issue - but keep in mind, that the real scenario when I've hit this is when debugging through node.js internal modules where javascript is passed around as a string parameter.

  1. Create a node.js project
  2. Store a string as a var and place a break point on the variable (the string should be very long, such as the contents of a multiline js file)
  3. When you hit the breakpoint, hover over the var to see it's value

Notice that the popup that shows the value of the string doesn't have scrollbars - also, if the contents of the string are long enough, the text will be cut off so that you can't see the entire contents of the string value.

Here is a screenshot that also shows the problem - note that when I hover over the "code" parameter. The popup window doesn't have anyway to scroll through the entire contents of the "code" parameter and it's cutoff so that I can't view all of the parameter's value.
cutoff

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Mar 14, 2017
@isidorn
Copy link
Contributor

isidorn commented Mar 15, 2017

Treating this as a feature request to add scroll bar to debug hover.
Currently we distuingish between two hovers, there is one for complex variables - this one has the tree inside and has the scroll bar. While the regular hover shows no scroll bar at the moment.
Here is a code pointer https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/debug/electron-browser/debugHover.ts#L29

@isidorn isidorn added feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities labels Mar 15, 2017
@isidorn isidorn added this to the Backlog milestone Mar 15, 2017
@isidorn isidorn removed their assignment Mar 15, 2017
@cristianhosu
Copy link
Contributor

If there isn't anyone else working on it, i could take it.
Thanks

@isidorn
Copy link
Contributor

isidorn commented Mar 24, 2017

@cristianhosu nobody is currently working on this. If you submit a PR feel free to ping me on it to provide feedback. Also feel free to ask questions if needed.

@cristianhosu
Copy link
Contributor

cristianhosu commented Mar 25, 2017

@isidorn I've started the vscode debug version and i can't seem to start a debug session in it. I have no environment, no debuggers installed. How do i enable debuggers in the debug version of vs code?

Edit: i've managed to start it and have the breakpoint in place but i can't seem to start the debug in that instance... it says: "Configured debug type 'node' is not supported."
I've tried to edit the start command to run the code.sh with --extensionDevelopmentPath to the primary extension path of vs code, but it just throws an error.
How do I get my extensions to work in the debug version of vs code?

cristianhosu added a commit to cristianhosu/vscode that referenced this issue Mar 25, 2017
cristianhosu added a commit to cristianhosu/vscode that referenced this issue Mar 25, 2017
cristianhosu added a commit to cristianhosu/vscode that referenced this issue Mar 25, 2017
cristianhosu added a commit to cristianhosu/vscode that referenced this issue Mar 25, 2017
@isidorn
Copy link
Contributor

isidorn commented Mar 27, 2017

@cristianhosu sorry about that, my comment in this issue should help you out
#20623 (comment)

cristianhosu added a commit to cristianhosu/vscode that referenced this issue May 6, 2017
cristianhosu added a commit to cristianhosu/vscode that referenced this issue Jun 13, 2017
cristianhosu added a commit to cristianhosu/vscode that referenced this issue Jun 13, 2017
cristianhosu pushed a commit to cristianhosu/vscode that referenced this issue Jun 14, 2017
isidorn pushed a commit that referenced this issue Jun 14, 2017
@isidorn
Copy link
Contributor

isidorn commented Jun 14, 2017

Fixes by a great PR by @cristianhosu

@isidorn isidorn closed this as completed Jun 14, 2017
@isidorn isidorn added verification-needed Verification of issue is requested and removed help wanted Issues identified as good community contribution opportunities labels Jun 14, 2017
@isidorn isidorn modified the milestones: June 2017, Backlog Jun 14, 2017
@weinand weinand added the verified Verification succeeded label Jun 28, 2017
@weinand
Copy link
Contributor

weinand commented Jun 28, 2017

I've verified with:

let longstring = 'z'.repeat(1000000);

For "legacy" protocol the DA truncates after 10000 characters so we do not profit from the scrolling a lot. For the "inspector" protocol the string is not truncated which makes the interaction with the hover difficult for a long string.

We should probably consolidate both approaches.

/cc @roblourens

@isidorn isidorn added the release-notes Release notes issues label Jun 29, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality release-notes Release notes issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants