Contents Up Previous Next

How can I display debugging messages?

If you use the function wxDebugMsg, messages will be displayed on either the standard error stream (X) or the debugging stream (Windows). To read these messages under Windows, you must either be running a debugger, or (perhaps more convenient), using a program such as Microsoft's DBWIN which displays these debugging messages in a text window.

Using DBWIN on a regular basis has the advantage of showing up some GDI errors that you might otherwise miss, but that could cause severe problems in future. DBWIN is available in the Windows SDK or on the Developer's Network CD-ROM, and probably by ftp from Microsoft's site.

DBWIN doesn't work under Windows 95 or Windows NT, unfortunately.

wxWindows supports debug logs: see the documentation for wxDebugContext.