Index: generic/tclPanic.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclPanic.c,v
retrieving revision 1.17
diff -u -r1.17 tclPanic.c
--- generic/tclPanic.c	15 Dec 2010 14:03:52 -0000	1.17
+++ generic/tclPanic.c	15 Dec 2010 14:20:12 -0000
@@ -90,8 +90,21 @@
 	fprintf(stderr, "\n");
 	fflush(stderr);
     }
+	/* try to trigger the debugger, if in debug mode */
+#ifdef TCL_MEM_DEBUG
+#   ifdef __GNUC__
+	__builtin_trap();
+#   elif _MSC_VER
+	DebugBreak();
+#   endif
+#endif
+
     /* In case the users panic proc does not abort, we do it here */
+#ifdef _WIN32
+	ExitProcess(1);
+#else
     abort();
+#endif
 }
 
 /*
Index: win/tclWinFile.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinFile.c,v
retrieving revision 1.118
diff -u -r1.118 tclWinFile.c
--- win/tclWinFile.c	15 Dec 2010 14:03:52 -0000	1.118
+++ win/tclWinFile.c	15 Dec 2010 14:20:12 -0000
@@ -823,14 +823,6 @@
     MessageBeep(MB_ICONEXCLAMATION);
     MessageBoxW(NULL, msgString, L"Fatal Error",
 	    MB_ICONSTOP | MB_OK | MB_TASKMODAL | MB_SETFOREGROUND);
-	/* try to trigger the debugger */
-#   ifdef __GNUC__
-	__builtin_trap();
-#   endif
-#   ifdef _MSC_VER
-	DebugBreak();
-#   endif
-	ExitProcess(1);
 }
 
 /*
