Bug 1374837 - Add some additional logging in case the Browser Toolbox fails to open;r=jryans
MozReview-Commit-ID: 8EYnjOcZFAU
--- 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').