Variables show wrong value when debugging
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 22
### What happened
I am not sure of what triggers the fault, but in the Variables window, the wrong value is displayed for some variables. I have only seen this with java.awt.Point variables. In the attached screenshot, the value of this.curr.p is displayed as four different values in 4 places...
The Watch curr.p says its value is [6,3] in the summary line, yet the individual fields are x=2, y=1
In the Variables, this.curr.p shows [2, 2] in the summary line, with x=0 and y=0 for the individual fields.
The correct value is x=2, y=1

### Language / Project Type / NetBeans Component
_No response_
### How to reproduce
I am sorry, but I don't know what triggers this. I have only ever seen it in my current project in the last few weeks. I don't recall when it first happened, but certainly not 6 months ago. Possibly it was introduced in the latest Netbeans update? However, I have only seen it for java.awt.Point variables, and I have only been using that type recently.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Win11
### JDK
jdk21
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
It seems intermittent... some variables display correct values, other don't. Usually looking at individual fields shows the correct values, whereas the summary line is often wrong. Creating a new Watch seems to give correct values... it is the update of a pre-existing Watch or Variable that shows the wrong value
### Are you willing to submit a pull request?
No
Contributor guide
Research direction
Start by reproducing the issue in Apache NetBeans 22 using java.awt.Point variables, comparing existing Watch and Variables entries with their summary and individual field values. The issue is done when refreshed debugger values consistently match the correct x and y fields, including for pre-existing Watches and Variables.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100