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

Provide a global context menu to auto expand lazy variables #179742

Open
testforstephen opened this issue Apr 12, 2023 · 9 comments
Open

Provide a global context menu to auto expand lazy variables #179742

testforstephen opened this issue Apr 12, 2023 · 9 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Milestone

Comments

@testforstephen
Copy link

We use lazy variables in the Java Debugger extension to display the toString() value of objects on demand. However, some users have complained that this makes the user experience worse and that it requires lots of clicks to see the details of the variables (See microsoft/vscode-java-debug#1297 (comment) and microsoft/java-debug#401 (comment)). VS Code has a setting to automatically expand lazy variables (Defaults to false), but most users are not aware of it.

In Java Debugger, we have exposed a context menu "Auto Expand Lazy Variables" to promote discovery and it has received more clicks than other context menu items. And we think this could be a useful feature for VS Code to provide globally.

lazy variables

@roblourens
Copy link
Member

I'm not opposed to it but don't want to put every option in the context menu necessarily. Have you heard the same feedback @connor4312?

@roblourens roblourens added the info-needed Issue requires more information from poster label Apr 12, 2023
@connor4312
Copy link
Member

I think a context menu action like "Reveal All Children" (wording TBD) that would apply to a variable and all of its children would make sense.

@roblourens
Copy link
Member

But not one to set the default via the setting?

@connor4312
Copy link
Member

Yea, I'm not a fan of a context menu to change the setting. Context menu actions should be _context_ual.

@roblourens
Copy link
Member

roblourens commented Apr 14, 2023

I think it is contextual, it would immediately expand all the visible variables and also set the default. It's similar to some of the toggles we have for notebook UI. A "Reveal All Children" command actually doesn't feel that helpful to me, I think it usually wouldn't save you that many clicks

@testforstephen
Copy link
Author

Yes, the menu should act as a toggle between different data views. When toggled, it should change the display style of all visible nodes instantly. I also expect the operation to be saved.

This type of menu can also be applied to other cases in the future, such as showing values as Hex or Dec. We have added it in Java extension, and it has a high usage rate as well .

@VSCodeTriageBot
Copy link
Collaborator

Hey @roblourens, this issue might need further attention.

@testforstephen, you can help us out by closing this issue if the problem no longer exists, or adding more information.

@roblourens roblourens added feature-request Request for new features or functionality debug Debug viewlet, configurations, breakpoints, adapter issues and removed info-needed Issue requires more information from poster labels Jul 5, 2023
@roblourens roblourens added this to the Backlog milestone Jul 5, 2023
@roblourens
Copy link
Member

Looking at this again, I actually don't like having a context menu option that controls a setting, because it should probably work at the workspace scope but it shouldn't go write to my workspace settings file. I think the setting as it exists is fine.

@myersguo
Copy link

myersguo commented Dec 6, 2023

as https://code.visualstudio.com/updates/v1_67#_debugging said:

A couple months ago, we added support for clicking a button to expand "lazy" variables in the debugger Variables view. There is a new setting, debug.autoExpandLazyVariables, to automatically expand lazy variables without a click.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

5 participants