PDA

View Full Version : QString and debugging



bnilsson
13th July 2008, 11:16
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

jpn
13th July 2008, 11:23
Mac OS X - View value of a QString in XCode debugger? (http://lists.trolltech.com/qt-interest/2004-05/thread01076-0.html) That's quite old thread but perhaps similar approach still works...

bnilsson
13th July 2008, 12:17
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.

caduel
13th July 2008, 13:06
I have no experience with XCode, but perhaps the following does help

http://lists.trolltech.com/qt4-preview-feedback/2005-07/thread00055-0.html

JJones
15th February 2011, 05:38
SOLUTION: see my posting in another thread:
http://www.qtcentre.org/threads/28383-How-to-View-QString-Object-data-while-debugging

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