Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-15394

"Locals and Expressions" does not update values from JavaScript after changing them manually

    XMLWordPrintable

Details

    • 62d4cf05105ee99646bfb5bf30dbbbc2f3559ab7

    Description

      1. Open the attached Qt Quick UI project:
        import QtQuick 2.4
        import QtQuick.Window 2.2
        
        Window {
            visible: true
        
            MouseArea {
                anchors.fill: parent
                onClicked: {
                    var i = 0;
                    i++;
                    i++;
                    i++;
                    var j = i;
                }
            }
        }
        
      2. Set a breakpoint in the first line of JavaScript code:
        var i = 0;
        
      3. Start debugging the project and click the UI.
        The debugger will stop at the line with the breakpoint.
      4. Step forward.
        In "Locals and Expressions" view, the value of i will correctly change to 0.
      5. Double-click the value of i in "Locals and Expressions" view and change it to a different value.
        The value does not seem to change.
      6. Step forward.
        The value of i still does not change.
      7. Step beyond the assignment j:
        var j = i;
        

        The value of i still won't update in "Locals and Expressions" view but j will receive the correct value including the change from step 5.

      8. Stop the debugger.
      9. Repeat steps 3 to 6.
      10. Show the value of i using the "QML/JS Console".
        The "QML/JS Console" will display the correct value of i. In the very same moment, the "Locals and Expressions" view will update to show the correct value of i, too.

      The "Locals and Expressions" view should always show the correct values of variables, even after changing them manually.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hjk hjk
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes