Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cannot see members of local variables during debug
Qt 6.12 LTS is out! See what's new in the release blog

Cannot see members of local variables during debug

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.5k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on 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
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on 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
      • ? Offline
        ? Offline
        A Former User
        wrote on 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
        • ? Offline
          ? Offline
          A Former User
          wrote on 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

          • Login

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