Index: kdecore/io/kdebug.cpp
===================================================================
--- kdecore/io/kdebug.cpp	(revision 682816)
+++ kdecore/io/kdebug.cpp	(working copy)
@@ -188,9 +188,9 @@
         int i;
         
         // connect to parent console 
-        AttachConsole((DWORD)-1);
+        //AttachConsole((DWORD)-1);
         // create separate console -> disabled for now
-        // AllocConsole();
+        AllocConsole();
 
         hCrt = _open_osfhandle((long) GetStdHandle(STD_INPUT_HANDLE),_O_TEXT);
         hf = _fdopen( hCrt, "r" );
@@ -213,12 +213,14 @@
         static bool consoleChecked = false;
         if (consoleChecked)
             return;
-        if (!isConsoleApp()) {
-            createConsole();
+        isConsoleApp = isConsoleApp();
+          
+//            createConsole();
         }
         consoleChecked = true;
     }
 #endif
+    bool isConsoleApp;
 #endif 
 
     QString aAreaName;
@@ -355,7 +357,10 @@
   case 2: // Shell
   {
 #ifdef Q_WS_WIN
-      fprintf(stderr,buf);
+//    if (kDebug_data->isConsoleApp)
+//        fprintf(stderr,buf);
+//    else
+        OutputDebugString(buf);
 #else 
       write( 2, buf, strlen( buf ) );  //fputs( buf, stderr );
 #endif      
