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 members of local variables during debug
Forum Updated to NodeBB v4.3 + New Features

Cannot see members of local variables during debug

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.0k 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.
  • E Offline
    E Offline
    esers
    wrote on 27 Jun 2013, 14:38 last edited by
    #1

    I have created console Qt app to get http page.
    I have a problem with authorization and want to debug my app.
    I put breakpoint and run debugger.
    When it stops at breakpoint I can see only local variables in "Locals and Expressions" window
    but not there members.

    @
    Locals
    request QNetworkRequest
    d QSharedDataPointer<QNetworkRequestPrivate>
    this @0x7fff14d91400 HttpManager
    [QObject] QObject
    qnam @0x24b1d90 QNetworkAccessManager
    reply @0x403225 QNetworkReply
    url QUrl
    d @0x24b2c20 QUrlPrivate
    Inspector
    Expressions
    request QNetworkRequest
    Return Value
    Tooltip
    @

    The request variable must have Url member set
    and Authorization header of reaquest must have value also.

    What is wrong?

    I try to start Qt creator under root (gksu comand), but it didn't help.
    I have Qt5.0.2 on Ubuntu 12.04 LTS on VirtualBox under Windows7.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jeroentjehome
      wrote on 27 Jun 2013, 17:55 last edited by
      #2

      Hmm, did you simply try and dubble click the variable you need, and drag and drop in the "Locals and Expressions"?

      Greetz, Jeroen

      1 Reply Last reply
      0
      • E Offline
        E Offline
        esers
        wrote on 29 Jun 2013, 07:10 last edited by
        #3

        Hi jeroentje,

        The variables are already in "Locals and examples" window.
        I simply click the arrows at the left of the variable to access it's members.
        But I don't see any members except, for example, "d 0x... QNetworkReply".

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on 3 Jul 2013, 09:54 last edited by
          #4

          Do you have a debug build of Qt?

          Most classes in Qt have one member only (called d) which is a pointer to a private structure. This allows us to hide away implementation details of classes (we need to be binary compatible after all).

          One side effect of this is that the debugger will not find any information on the private structures in release builds and is thus unable to display anything for those.

          1 Reply Last reply
          0

          2/4

          27 Jun 2013, 17:55

          • Login

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