Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cannot see values of variables when debugging
Forum Updated to NodeBB v4.3 + New Features

Cannot see values of variables when debugging

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 3.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PetQter
    wrote on last edited by
    #1

    Hello,
    I have installed Qt 5.12.0, QtCreator 4.8.0 and Visual Studio 2017. I build 32-bit application with kit Desktop Qt 5.12.0 MSVC2017 32-bit.

    I see values of many variables <not accessible> or <optimized out>. I checked compiler switches and see that compiler uses -Od and -Zi (disable optimization and setting debug format) so it is right. When I start debug built version without QtCreator and attach Visual Studio debugger then I see values of all variables so full debug information is present.
    I tried to set path to Debug folder of my application with application's *.pdb into Options->Debugger->CDB Paths. It does not help.
    Why QtCreator does not display values of variables ?

    P 1 Reply Last reply
    0
    • P PetQter

      Hello,
      I have installed Qt 5.12.0, QtCreator 4.8.0 and Visual Studio 2017. I build 32-bit application with kit Desktop Qt 5.12.0 MSVC2017 32-bit.

      I see values of many variables <not accessible> or <optimized out>. I checked compiler switches and see that compiler uses -Od and -Zi (disable optimization and setting debug format) so it is right. When I start debug built version without QtCreator and attach Visual Studio debugger then I see values of all variables so full debug information is present.
      I tried to set path to Debug folder of my application with application's *.pdb into Options->Debugger->CDB Paths. It does not help.
      Why QtCreator does not display values of variables ?

      P Offline
      P Offline
      PetQter
      wrote on last edited by
      #2

      @PetQter I found solution. Tools->Options->Debugger->Locals & Expressions, setting: "Use Debugging Helper". When I tried to set it I can see local variables. But when I unset it again still I can see local variables.
      So it seems that on first setting of this checkbox invokes some permanent change.
      Weird but functional.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        It's indeed surprising...

        Anyway, thanks for sharing !

        Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved