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

CDB: return value not shown by Qt Creator debugger

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 4.8.1
    • Debugger
    • None
    • Windows 10, 64-bit
      Microsoft Visual Studio 2015 Update 3
      Qt 5.6.2
      Qt Creator 4.8.1
      Debugger = Auto-detected CDB at C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe
    • Windows

    Description

      According to http://doc.qt.io/qtcreator/creator-debug-mode.html#local-variables-and-function-parameters :

      The Locals view consists of the Locals pane and the Return Value pane (hidden when empty).

      Whenever a program stops under the control of the debugger, it retrieves information about the topmost stack frame and displays it in the Locals view. The Locals pane shows information about parameters of the function in that frame as well as the local variables. If the last operation in the debugger was returning from a function after pressing Shift+F11, the Return Value pane displays the value returned by the function.

      However, this does not work in my environment. Minimal example to reproduce:

      debugger_return_pane.pro:

      TEMPLATE = app
      SOURCES += main.cpp
      TARGET = DebuggerReturnPane
      

      and here is main.cpp:

      int foo()
      {
          return 0;
      }
      
      int main()
      {
          int x = foo();
          return x;
      }

      Steps to reproduce:

      • set a breakpoint on the first statement of main()
      • lauch the debugger
      • F11 (steps into foo())
      • Shift+F11 (steps out of foo())
      • problem: no return value visible

      The problem was acknowledged by aha_1980: https://forum.qt.io/topic/99119/return-value-not-shown-by-qt-creator-debugger/7

      Attachments

        1. debugger_return_pane.pro
          0.1 kB
        2. main.cpp
          0.1 kB

        Issue Links

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

          Activity

            People

              davschul David Schulz
              dave2 Dave Ohlsson
              Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes