-
Notifications
You must be signed in to change notification settings - Fork 359
toString() Object View should catch exceptions, or default to false #1297
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
Comments
Thanks for reaching out. Could you share the logs via command below? F1 -> Java: Open Java Language Server Log File |
This is what it contains when I changed to "Enable toString() Object View":
|
Thx @testforstephen, I had no clue about lazy variables, and maybe the problem then is a UX problem - I guess many other people don't have a clue about this neither, and I'd say: they shouldn't have to have it. The question maybe is: why does the Java debug extension report those variables as lazy in the first place? The only seemingly related issue I could find is this: #311 |
See microsoft/java-debug#401, evaluating the |
thx @testforstephen , but I wonder what evidence there is that evaluating I guess that the point of evaluating it lazily is based on the assumption that display could be sluggish otherwise, i.e. it exists to prevent bad a UX? Combined with the given defaults, though, this seems to mean that for most people no values will be displayed at all, which is much of a worse UX IMHO .... |
this is just personal opinion. The problem for you is that the eye icon is not intuitive as a clickable link. That has room to improve. Something I'm thinking is that we can expose a context menu as shortcut to enable/disable "Auto expand lazy variables". |
Hm, as a developer, I'd like to immediately see values of variables, instead of having to either click small icons, or having to know which option to set in in a context menu? If the option "Auto expand lazy variables" was true by default, and can be switched to false by the developer once he/she notices lags, then IMHO that would be a good solution. |
When using the vscode java debugger, the experience can be really bad because some variables cannot be inspected seemingly for no reason. This gives the impression that the extension is still very buggy. It took me a long time to find out that disabling the toString() Object View solves that problem.
Likely there are exceptions thrown during
toString()
execution for those variables. These should either be caught, or the default for "Enable toString() Object View" should be false.Environment
Steps To Reproduce
Current Result
Some variables cannot be inspected
Expected Result
It should be possible to inspect all variables, regardless of whether their
toString()
method throws an exceptionThe text was updated successfully, but these errors were encountered: