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

Show toString() values in hover tooltips #364

Closed
rothfels opened this issue Aug 14, 2018 · 3 comments · Fixed by #587 or microsoft/java-debug#276
Closed

Show toString() values in hover tooltips #364

rothfels opened this issue Aug 14, 2018 · 3 comments · Fixed by #587 or microsoft/java-debug#276
Assignees
Milestone

Comments

@rothfels
Copy link

rothfels commented Aug 14, 2018

Similar to #315, it would be very useful to show the .toString of an object in the hover tooltip.

For example, in vanilla Eclipse debugger:

screencapture

vs. in VS Code, you also have to expand the elements to see what's inside:

screencapture2

Steps To Reproduce
  1. set breakpoint
  2. hover over local variable
Current Result

See object explorer tooltip

Expected Result

Also see a useful .toString, as in Eclipse

@andxu
Copy link
Contributor

andxu commented Aug 14, 2018

@rothfels thank you for using our extension and opening up the concern for custom display, I can feel the eager needs to this feature, actually I used this feature to display a list in the replies of this issue, but due to the complicated logic of invoking evaluation engine and hard to bring manipulation ui in vscode for custom definition, the feature is not been put to start for now, but a quick/compromised solution may be only support a field and a method call without argument from a vscode workspace/project configuration, the com.microsoft.java.debug.core is a pure java maven project and perhaps a enthusiastic can contribute to that feature(we are on-progressing of providing documents to contributors about how to develop and test our extension), otherwise I would take a time for that.
the object formatter code is here, and the unit test code here

@fbricon
Copy link
Collaborator

fbricon commented Oct 25, 2018

Eclipse allows users to define custom detail formatter expressions in its debugger, so that you can get a sensible String representation of an object, even if it doesn't override toString() itself.

@rothfels
Copy link
Author

This is awesome, thank you so much @testforstephen! 🎉

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