1. RemoteDebugger now runs user code in subprocess MainThread
2. run.py: move exception printing to toplevel to allow access from main()
3. Clarification in PyShell.py: when the subprocess is restarted, the
   debugger GUI is reused with a fresh instance of the subprocess
   debugger.

M PyShell.py
M RemoteDebugger.py
M run.py
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index ba898b2..af3267a 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -368,6 +368,7 @@
         debug = self.getdebugger()
         if debug:
             try:
+                # Only close subprocess debugger, don't unregister gui_adap!
                 RemoteDebugger.close_subprocess_debugger(self.rpcclt)
             except:
                 pass
@@ -387,6 +388,7 @@
         console.text.mark_gravity("restart", "left")
         # restart subprocess debugger
         if debug:
+            # Restarted debugger connects to current instance of debug GUI
             gui = RemoteDebugger.restart_subprocess_debugger(self.rpcclt)
             # reload remote debugger breakpoints for all PyShellEditWindows
             debug.load_breakpoints()