Visitar URL original
Debugger => Some variable content popup issues · Issue #1628 · microsoft/vscode-java-debug · GitHub
Skip to content

Debugger => Some variable content popup issues #1628

Description

@reuschling

During debugging, VsCode has three quick possibilities to show the detailed content of variables (as far as I know):

  1. The file edit area: For each line the content of the variables in this line are shown which is very nice. With mouse hovering over this area a popup appears with a bigger, multiline view of these contents, which is even nicer. As far as I know, this is currently the only way to have a fast multiline content view during debugging.
Image

I have found these issues with it:

  • You can see in the image that the variables content goes over two lines. The popup appears by hovering both over the first line and the second. With the first line everything is fine, but when I trigger the popup from the second line the popup appears a bit higher as the mouse pointer (i.e. at the first line, which is the corresponding code line). If I then move the mouse in order to select some popup text or just want to scroll, the popup disappears immediately. You can go with the mouse 'into' the popup if it was triggered from the first line only
  • It is currently impossible to select all text from the popup if the text doesn't fit into the area, i.e. there is a scrollbar. If I want to select with the mouse, the popup disappears if I move over the border of the popup instead of scrolling and selecting more text. If I want to select everything with 'ctrl+a', it selects the code inside the file edit area instead
  • The toString() content of a variable is only shown if someone clicks on the 'click to expand' eye-button for this variable inside the variables view. It would be VERY useful if this button could also appear inside this popup. This is the button of the variables view:
Image
  1. In the variables view: There also a popup appears. Sadly this is not multiline, the size can not be adjusted, it is only useful for really small content as numbers or small strings, and small content is shown directly inside the variable view anyway. It would be preferable to have the same or a similar popup as inside the edit area
Image
  1. When hovering over a variable inside the file edit area: Here, the content is shown similar as in the variables view. It would be nice if there is a possibility to see multiline content also. E.g. with the same or similar popup as in 1.
Image

Activity

  1. github-actions commented on Apr 17, 2026

    @github-actions

    Hi reuschling, I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.

    Workarounds & Suggestions

    • Copy full value: In the Variables view right-click your variable → Copy Value (Ctrl+C) or Copy as Expression, then paste into an editor to see the full multiline content.
    • Enable sticky hovers: In your settings.json add:
      "editor.hover.sticky": true
      This lets you move your mouse into the hover popup without it disappearing immediately.
    • Use Debug Console: Evaluate or print(variable.toString()) in the Debug Console to get a full, scrollable, multiline result.

    Existing Feature Request

    • Is there a way to see the full toString() content of a variable, including newlines? (#1111) – you can add a comment or 👍 to upvote this enhancement for multiline hovers and native toString() expansion.
    Other references with low confidence
    • hover instance in debug mode don't show popup with details (#444) – reports hover popups not appearing at all after an update.

    The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!

  2. reuschling commented on Apr 17, 2026

    @reuschling
    Author

    The AI labeled this as enhancement, which is only partially true

  3. wenytang-ms commented on Apr 28, 2026

    @wenytang-ms
    Contributor

    reuschling Thanks for the detailed feedback. I agree this is a valid usability issue for long or multiline variable values.

    Most of the behavior mentioned here is controlled by VS Code's debug/editor UI rather than the Java debugger extension. The Java
    extension can provide the variable text / toString() value, but hover positioning, stickiness, selection, scrolling, and actions
    inside the popup are handled by VS Code. The lazy “click to expand” action is currently only supported in the VARIABLES tree, not in
    inline value or hover popups.

    So I’d keep this as an enhancement / upstream-dependent issue. Current workarounds are enabling "editor.hover.sticky": true,
    setting "java.debug.settings.maxStringLength": 0, or evaluating variable.toString() in the Debug Console / WATCH view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions