aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/main.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index f17f942..de27e5e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -40,6 +40,15 @@
#include "undo.h"
#include "error.h"
+/*
+ * Define this to pause the program at the beginning
+ * of main() (Windows only).
+ * This is a useful hack on Windows, where gdbserver
+ * sometimes refuses to start SciTECO but attaches
+ * to a running process just fine.
+ */
+//#define DEBUG_PAUSE
+
namespace SciTECO {
#define INI_FILE ".teco_ini"
@@ -286,6 +295,11 @@ main(int argc, char **argv)
realloc /* try_realloc */
};
+#ifdef DEBUG_PAUSE
+ /* Windows debugging hack (see above) */
+ system("pause");
+#endif
+
signal(SIGINT, sigint_handler);
g_mem_set_vtable(&vtable);