Null Null created NETBEANS-5538:
-----------------------------------

             Summary: Debugger wrong String value displayed in popup
                 Key: NETBEANS-5538
                 URL: https://issues.apache.org/jira/browse/NETBEANS-5538
             Project: NetBeans
          Issue Type: Bug
          Components: debugger - Java
    Affects Versions: 12.0
         Environment: OpenJDK 11

Debian 10

KDE Plasma 5
            Reporter: Null Null


When stepping over multiple String assignment statements with a single 
variable, the values popup always shows only the first value assigned. It 
doesn't reflect any new assignments, so it becomes incorrect (and thus 
extremely misleading). The value in the variables table remains correct at all 
times, but for longer String values, the values popup is the only way to 
confirm the correct value.

To replicate (always):

 
{code:java}
public static void main(String[] args) {
    String s;
    s = "alpha";
    s = "beta";
    s = "gamma";
}
{code}
Add a breakpoint at the second assignment statement, then debug file. Use Step 
Over (keyboard or click) two times. In the Variables tab, the value of {{s}} 
will show "gamma" as expected in the table.

Now, click the "..." in the value column.

Expected: popup shows {{gamma}} value (correct value)
Actual: popup shows {{alpha}} value instead (wrong value!)

Note: If the breakpoint is set on the third assignment statement instead, and 
Step Over is used only once, the value of the popup will show {{beta}} value 
cached instead of {{alpha}} value, but still doesn't reflect correct {{gamma}} 
value.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to