Sleep on XRE_MAIN_BREAK for attaching debugger draft
authorKarl Tomlinson <karlt+@karlt.net>
Tue, 01 Jul 2014 18:16:27 +1200
changeset 645147 35dec2b1588eee09833d4fd9eb8d584ef93cc2c6
parent 643612 a4a448ba7f187069fce916ee234a06cbb0d06f80
child 645148 947305b88f764f0d2c3d2afa97a21970c4c1239e
push id73684
push userktomlinson@mozilla.com
push dateFri, 11 Aug 2017 22:29:12 +0000
milestone57.0a1
Sleep on XRE_MAIN_BREAK for attaching debugger MozReview-Commit-ID: 2JnzIUy6Gq1
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -3185,18 +3185,24 @@ XREMain::XRE_mainInit(bool* aExitFlag)
 #endif
 
   }
 
   nsresult rv;
   ArgResult ar;
 
 #ifdef DEBUG
-  if (PR_GetEnv("XRE_MAIN_BREAK"))
+  if (PR_GetEnv("XRE_MAIN_BREAK")) {
+#ifdef XPWIN
     NS_BREAK();
+#else
+    printf("attach %d\n", getpid());
+    sleep(30);
+#endif
+  }
 #endif
 
 #ifdef USE_GLX_TEST
   // bug 639842 - it's very important to fire this process BEFORE we set up
   // error handling. indeed, this process is expected to be crashy, and we
   // don't want the user to see its crashes. That's the whole reason for
   // doing this in a separate process.
   //