I'm adding debug messages that print when I enter and exit a function, such as:
void MyClass::function1()
{
qDebug() << "enter";
...
qDebug() << "exit";
}
QString MyClass::function2(QString input_text)
{
qDebug() << "enter " << input_text;
...
qDebug() << "exit return = " << return_value;
}
I set QT_MESSAGE_PATTERN to print the function name and line number. When I compile, I use QT_NO_DEBUG to turn the print statements on and off.
My program is very large, with probably 100 files, each containing a class. I would like a way to turn the debug statement on in a single class, while it is off for all the other classes. Any suggestions?
Bookmarks