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

[#7228] - Add debugger default variable formatter for BigInteger and BigDecimal #7617

Merged
merged 1 commit into from
Aug 4, 2024

Conversation

ShadowOfLies
Copy link
Contributor

Referencing #7228

Adds default formatters for BigDecimal and BigInteger displayed in the debugger variables window. These fomatters are useful, since these objects are not simple wrappers.

image

@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) debugger labels Jul 28, 2024
@mbien mbien added this to the NB24 milestone Jul 28, 2024
@mbien mbien added the ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) label Jul 28, 2024
@apache apache locked and limited conversation to collaborators Jul 28, 2024
@apache apache unlocked this conversation Jul 28, 2024
@mbien mbien linked an issue Jul 28, 2024 that may be closed by this pull request
Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thanks!

@mbien
Copy link
Member

mbien commented Jul 29, 2024

I have to wonder though how many don't realize that the debugger table has a toString() column?

The formatters are likely something which needs a good look. I am pretty sure that the original reason for providing default formatters was so that a toString() on collections wouldn't explode or cause concurrency issues and also to show that users could do the same if they encounter objects with similar problems.

The Map.Entry formatter is already problematic alone for the fact that it simply calls toString() on something which could be a collection too, without using the dedicated formatter for it.

We should probably consider to render the toString() column by default but delay items by using [show] and [show all] buttons or something similar. And then reconsider what needs to be a default formatter.

@ShadowOfLies
Copy link
Contributor Author

I have to wonder though how many don't realize that the debugger table has a toString() column?

Honestly, in all my years of using NetBeans, I think I might have noticed it once, but I can't say that it is very noticeable.

We should probably consider to render the toString() column by default but delay items by using [show] and [show all] buttons or something similar. And then reconsider what needs to be a default formatter.

Luckily the list of default formatters is very small still, but I fully agree, it would be ideal to have the toString() column displayed by default without the rendering affecting the performance/memory. It could definitely be worth looking into as a separate task. :)

Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the value and this looks sane to me. Values could be fatally big, but that is also true for other cases. Lets pull this in for NB24 as a feature.

@matthiasblaesing matthiasblaesing merged commit a5fa02d into apache:master Aug 4, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) debugger Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debugger: show BigDecimal value in variables
3 participants