Bug 1474609 - Improve exception logging during Debugger main module loading. r=ochameau
authorJason Laster <jlaster@mozilla.com>
Tue, 02 Apr 2019 17:32:34 +0000
changeset 467632 d980e312439f112b41af18b4365b5e253fc90c39
parent 467631 196f7c24339ea15a3129ce2197ee7d6bbbbc10ad
child 467633 37530e362d329083cb3d1a57e2c735252a1b3b83
push id35806
push userrgurzau@mozilla.com
push dateWed, 03 Apr 2019 04:07:39 +0000
treeherdermozilla-central@45808ab18609 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1474609
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1474609 - Improve exception logging during Debugger main module loading. r=ochameau Differential Revision: https://phabricator.services.mozilla.com/D25215
devtools/client/debugger/new/index.html
--- a/devtools/client/debugger/new/index.html
+++ b/devtools/client/debugger/new/index.html
@@ -38,19 +38,25 @@
 
   <body>
     <div id="mount"></div>
     <script
       type="application/javascript"
       src="chrome://devtools/content/shared/theme-switching.js"
     ></script>
     <script type="text/javascript">
-      const { BrowserLoader } = ChromeUtils.import(
-        "resource://devtools/client/shared/browser-loader.js"
-      );
-      const { require } = BrowserLoader({
-        baseURI: "resource://devtools/client/debugger/new",
-        window
-      });
-      Debugger = require("devtools/client/debugger/new/src/main");
+      try {
+        const { BrowserLoader } = ChromeUtils.import(
+          "resource://devtools/client/shared/browser-loader.js"
+        );
+        const { require } = BrowserLoader({
+          baseURI: "resource://devtools/client/debugger/new",
+          window
+        });
+        Debugger = require("devtools/client/debugger/new/src/main");
+      } catch (e) {
+        dump("Exception happened while loading the debugger:\n");
+        dump(e + "\n");
+        dump(e.stack + "\n");
+      }
     </script>
   </body>
 </html>