Bug 1374837 - Add some additional logging in case the Browser Toolbox fails to open;r=jryans
authorBrian Grinstead <bgrinstead@mozilla.com>
Wed, 21 Jun 2017 11:13:35 -0700
changeset 662692 6616cbb6460fdf486e447248aec1f9803db4acdb
parent 662691 650520572447ba9daeb09e05da0204a4dc83ca7e
child 662693 1bc15f7fe1af609e913489d6f615b6d41701c731
push id79159
push userhikezoe@mozilla.com
push dateMon, 11 Sep 2017 23:25:15 +0000
reviewersjryans
bugs1374837
milestone57.0a1
Bug 1374837 - Add some additional logging in case the Browser Toolbox fails to open;r=jryans MozReview-Commit-ID: 8EYnjOcZFAU
devtools/client/framework/ToolboxProcess.jsm
--- a/devtools/client/framework/ToolboxProcess.jsm
+++ b/devtools/client/framework/ToolboxProcess.jsm
@@ -6,16 +6,17 @@
 
 "use strict";
 
 const { interfaces: Ci, utils: Cu, results: Cr } = Components;
 
 const DBG_XUL = "chrome://devtools/content/framework/toolbox-process-window.xul";
 const CHROME_DEBUGGER_PROFILE_NAME = "chrome_debugger_profile";
 
+const { console } = Cu.import("resource://gre/modules/Console.jsm", {});
 const { require, DevToolsLoader } = Cu.import("resource://devtools/shared/Loader.jsm", {});
 const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "Subprocess", "resource://gre/modules/Subprocess.jsm");
 XPCOMUtils.defineLazyGetter(this, "Telemetry", function () {
   return require("devtools/client/shared/telemetry");
 });
 XPCOMUtils.defineLazyGetter(this, "EventEmitter", function () {
@@ -297,16 +298,18 @@ BrowserToolboxProcess.prototype = {
           data = await pipe.readString();
         }
       };
       dumpPipe(proc.stdout);
 
       proc.wait().then(() => this.close());
 
       return proc;
+    }, err => {
+      console.log(`Error loading Browser Toolbox: ${command} ${args.join(" ")}`, err);
     });
   },
 
   /**
    * Called upon receiving the connectionchange event from a debuggerServer.
    *
    * @param {String} what
    *        Type of connection change (can be either 'opened' or 'closed').