void qDebug ( const char * msg, ... )
Calls the message handler with the debug message msg. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the console, if it is a console application; otherwise, it is sent to the debugger.
Here, If I write a GUI program. the debug message will not send to the console, it will send to the debugger. where's the debugger? Is that to say that I should use the Qt 4.4.3 (Build Debug Libraries) console to compile the program?
The header file <QtGlobal> contains some debugging macros and #defines.
Three important macros are:
* Q_ASSERT(cond), where cond is a boolean expression, writes the warning "ASSERT: 'cond' in file xyz.cpp, line 234" and exits if cond is false.
* Q_ASSERT_X(cond, where, what), where cond is a boolean expression, where a location, and what a message, writes the warning: "ASSERT failure in where: 'what', file xyz.cpp, line 234" and exits if cond is false.
* Q_CHECK_PTR(ptr), where ptr is a pointer. Writes the warning "In file xyz.cpp, line 234: Out of memory" and exits if ptr is 0.
Here tells will send some warning, but where will the warnings send to? the console?
Thanks! Your are my great help.
Bookmarks