Debugging Qt source in Netbeans 8.1: how to inspect QStrings etc?
-
Netbeans uses gdb to debug C++ code by default.
This https://wiki.qt.io/IDE_Debug_Helpers describes how QStrings can be supported in several IDEs, but not in gdb/Netbeans.
This recommends creating a macro file for gdb: https://zhjxue.wordpress.com/2009/03/14/how-to-show-value-of-qstring-in-gdb/
And this speaks of supporting Qt5 QString differences (but not other classes): http://silmor.de/qtstuff.printqstring.phpWould be nice if Qt could put out a guide for inspecting the Qt classes in gdb, which is a kind of popular debugger.
-
A somewhat related question:
If I dump debug info using
qDebug()
to the Netbeans output window, it dumps w/o carriage return.
The next line is offset to the end of the previous and everything looks like stairs running out into the right side of the screen.
Should I append CR to every line or is there anything in configuration I should set up for CR to be added automatically?Looks like this:
abc def ghi etc