Debugging and Logging in wxWidgets with wxLogWindow

wxLogWindow make it much easier to debugging and logging.

in the constructor add the following code:

#if defined(__WXDEBUG__ )
    //logging and debugging
    wxLogWindow *w= new wxLogWindow(this, wxT("Logger"));
    w->Show();
#endif

Then, in anywhere, add the following:

wxLogDebug(wxT("Debug message"));

If you are running in Debug build target, it'll show a small console and displaying all the messages. If you are running in release mode, that console won't appear and thus no log messages there.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer