Results 1 to 5 of 5

Thread: QString and debugging

  1. #1
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QString and debugging

    I am annoyed by the fact that I cannot see the content of a QString in my debugger.
    I have to translate it to a std::string to see it, and this mean I have to add this redundant code to see what I am doing. Not a lot of work, but annoying.

    Is this the only way to do it or is there some better solution?

    Qt-4.4.0
    MacOSX 10.5.3 and Xcode 3.0
    MacOSX user dabbling with Linux and Windows.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QString and debugging

    Mac OS X - View value of a QString in XCode debugger? That's quite old thread but perhaps similar approach still works...
    J-P Nurmi

  3. #3
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QString and debugging

    Looks great, but it is not working for Xcode-3.0.
    There is no "Debugger -> Customized Data Display" and if I enter "{$VAR.latin1()}:s" in the summary field for the varialble in the debugger it just says "out of scope".

    If anybody got this working for Xcode 3.0 I would be very interested to know how it should be done.
    MacOSX user dabbling with Linux and Windows.

  4. #4
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 162 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QString and debugging

    I have no experience with XCode, but perhaps the following does help

    http://lists.trolltech.com/qt4-previ...ad00055-0.html

  5. #5
    Join Date
    Feb 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QString and debugging

    SOLUTION: see my posting in another thread:
    http://www.qtcentre.org/threads/2838...hile-debugging

    This is a linux solution but should work for OSX environment (using gdb?) as well?

Similar Threads

  1. Macro used for debugging
    By sunil.thaha in forum General Programming
    Replies: 11
    Last Post: 30th March 2007, 17:32
  2. KDevelop Debugging
    By freak in forum KDE Forum
    Replies: 1
    Last Post: 23rd June 2006, 22:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.