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