Page 1 of 1

Debugging qstring

Posted: Sat Oct 04, 2008 7:37 am
by kroenecker
Does codelite handle debugging qstring values through gdb?

Re: Debugging qstring

Posted: Sat Oct 04, 2008 9:20 am
by eranif
kroenecker wrote:Does codelite handle debugging qstring values through gdb?
The problem with GDB in general is that it does not handle unicode string (wide chars)

This is the same problem as for wxString. I am using Qt for my daily work and the only way i found to view the content of QString is to add in my code lines like:

Code: Select all

char *p = str.toLocal8Bit().constData();
You can try this:
- From settings -> Debugger Settings add new 'PreDefined Tpye' name it

Code: Select all

QString 
and set the value to:

Code: Select all

$(Variable).toLocal8Bit().constData()
- Or you can use the memory view tab and add there: 'str.d'

search for it in google, there are many similar questions.

Eran