Debugging qstring

CodeLite installation/troubleshooting forum
kroenecker
CodeLite Curious
Posts: 1
Joined: Sat Oct 04, 2008 7:36 am
Contact:

Debugging qstring

Post by kroenecker »

Does codelite handle debugging qstring values through gdb?
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugging qstring

Post 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
Make sure you have read the HOW TO POST thread
Post Reply