User forums > Help

Change the format in the debugger

(1/2) > >>

lordkrotos:
Hi every body,

I am what we call a "noob" in c++ developpment, and also in english... So, please be indulgent!  :lol:

I've juste discover code::Blocks last week, and I'm afraid I can't do anything with it, because the format of watches in debugger mode in unreadable for me. Is there a way to change it in a more "human comprehensive" way?

Thanks

killerbot:
can you give an example of your project and what you consider unreadable ??

lordkrotos:
I wanted to say: un-understandable.
Here is the part of the code I want to watch:
//
  QTextStream in(&file);
        QString str;
        int i=0;
        while (!in.atEnd())
        {
           str =in.readLine();//
            i++;
        }
//

The debbuger tell me that str=0X11d9048 instead of d="a string".
Thank you

killerbot:
yep ,those things are not completely possible, though you can do stuff things with scripting to have such things visible. I have looked very briefly at it, not enough on telling you how to do it, sorry.
I think in the (nightly) installation of CB there are some example scripts (fo example one fot std::string and wxstring), those might help you on creating one yourself.

thomas:
(you did not state which version you use, but I assume a recent build)

Well... QString is some class, you cannot expect the debugger to know how to handle it. So what it does is, it shows a pointer to it.

In fact, the debugger in Code::Blocks is by default already being extremely nice because it decodes wxString as well as std::string and a couple of other STL classes. Most debuggers don't do that! :)

You should do a forum search, there is a thread describing how to add debugger scripts (I don't remember where). You can write a watch script to decode *any* kind of class, be it QString or RString or SString  :)

Navigation

[0] Message Index

[#] Next page

Go to full version