On Sun, Dec 19, 2010 at 12:43:00AM +0900, Paulo Silva wrote: > I'm playing around with the debugger helpers feature, but I can't seem to be > able to add custom helpers. I'm following this page: > http://doc.qt.nokia.com/qtcreator-snapshot/creator-debugging-helpers.html > > which says: > "The function name has to be qdump__NS__Foo, where NS::Foo is the class or > class template to be examined. Nested namespaces are possible." > > Well I have a > namespace ns { > struct Abc { > int i; > float f; > }; > } > > and I created a dumper like: > def qdump__cgl__Abc(self, item): > print 'qdump__cgl__Abc' > self.putType(item.value.type) > v = item.value > self.putValue("(%f %f)" % (v["i"], v["f"])) > self.putNumChild(0) > Am I doing something wrong here?
The 'cgl' in the dumper name does not match the 'ns' namespace, but it has to. You should also use %s instead of %f in the format string. Note that you cannot use 'print' for debug messages as the real content is transfered using this 'channel'. You can use the 'warn(...)' function to pass debug output to the debugger log. ['self' is an unusual name for the dumper parameter, as this is not a class method, but as this is only convention it should not matter] Apart from that the dumper looks ok and should work. > How do I set the DebugDebuggingHelpers to true? > Maybe that could help me understand what I'm doing wrong. That was only useful for the compiled version of the dumper and it recently was even removed it from the codebase in the master branch. Andre' _______________________________________________ Qt-creator mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt-creator
