-// wxDebugContext::PrintClasses();
-// wxDebugContext::Dump();
-// wxDebugContext::PrintStatistics();
+ // On MSW, Dump() crashes if using wxLogGui,
+ // so use wxLogStderr instead.
+ wxLog* oldLog = wxLog::SetActiveTarget(new wxLogStderr);
+
+ wxDebugContext::PrintClasses();
+ wxDebugContext::Dump();
+ wxDebugContext::PrintStatistics();
+
+ // Set back to wxLogGui
+ delete wxLog::SetActiveTarget(oldLog);