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

Wrong iterator shown in the debugger "Locals"?

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 14.0.2
    • Debugger
    • None

    Description

      Hi there, I'm not really sure whether this is a bug, or me just not fully understanding how to use the debugger window...

       

      So the issue is that the piece of code runs reverse std::find_if on the QList. The "found" iterator itself is the correct one (You can see in the expressions `lastDelimiterTokenBeforeLineSplitIt->lexKind == 52`)

      However in the "Locals" section `lastDelimiterTokenBeforeLineSplitIt.current->i` shows the data of the element before. (`lexKind == 29`)

      I would expect to see in the "Locals" that `lastDelimiterTokenBeforeLineSplitIt` points to the "found" element and not to the previous one.

       

      So is it me who don't understand iterators and how to read "Locals" window or is it a bug on the QtCreator debugger?

      See screenshot for details.

       

      Thank you

      Attachments

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

        Activity

          People

            hjk hjk
            dima.a Dmitrii Akshintsev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes