New console code based on Win32 windows.

diff --git a/server/debugger.c b/server/debugger.c
index bde3444..09b4240 100644
--- a/server/debugger.c
+++ b/server/debugger.c
@@ -14,6 +14,7 @@
 #include "process.h"
 #include "thread.h"
 #include "request.h"
+#include "console.h"
 
 enum debug_event_state { EVENT_QUEUED, EVENT_SENT, EVENT_CONTINUED };
 
@@ -411,6 +412,11 @@
     for (thread = debugger; thread; thread = thread->process->debugger)
         if (thread->process == process) goto error;
 
+    /* don't let a debugger debug its console... won't work */
+    if (debugger->process->console &&
+        debugger->process->console->renderer == process &&
+        process->console) goto error;
+
     suspend_process( process );
 
     /* we must have been able to attach all threads */