summaryrefslogtreecommitdiffstats
path: root/devtools/client/devtools-startup.js
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-03-02 10:32:45 +0100
committerGitHub <noreply@github.com>2018-03-02 10:32:45 +0100
commite272829137195b46612b7664c9416364089f7baa (patch)
tree20b543048260952a2c4ac8bb4cb22aaaa684bd84 /devtools/client/devtools-startup.js
parentba2c2e5301bb2d993984c62cdf2fd07b361e6bca (diff)
parentc8355b22c047c9737e32f096b816edbb8b0fa181 (diff)
downloadUXP-e272829137195b46612b7664c9416364089f7baa.tar
UXP-e272829137195b46612b7664c9416364089f7baa.tar.gz
UXP-e272829137195b46612b7664c9416364089f7baa.tar.lz
UXP-e272829137195b46612b7664c9416364089f7baa.tar.xz
UXP-e272829137195b46612b7664c9416364089f7baa.zip
Merge pull request #34 from janekptacijarabaci/devtools_import-from-moebius_1
Port across devtools enhancements
Diffstat (limited to 'devtools/client/devtools-startup.js')
-rw-r--r--devtools/client/devtools-startup.js27
1 files changed, 17 insertions, 10 deletions
diff --git a/devtools/client/devtools-startup.js b/devtools/client/devtools-startup.js
index 2271dd790..4a385a9d5 100644
--- a/devtools/client/devtools-startup.js
+++ b/devtools/client/devtools-startup.js
@@ -25,7 +25,7 @@ function DevToolsStartup() {}
DevToolsStartup.prototype = {
handle: function (cmdLine) {
- let consoleFlag = cmdLine.handleFlag("jsconsole", false);
+ let consoleFlag = cmdLine.handleFlag("browserconsole", false);
let debuggerFlag = cmdLine.handleFlag("jsdebugger", false);
let devtoolsFlag = cmdLine.handleFlag("devtools", false);
@@ -75,9 +75,9 @@ DevToolsStartup.prototype = {
this.initDevTools();
let { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
- let hudservice = require("devtools/client/webconsole/hudservice");
+ let { HUDService } = require("devtools/client/webconsole/hudservice");
let { console } = Cu.import("resource://gre/modules/Console.jsm", {});
- hudservice.toggleBrowserConsole().then(null, console.error);
+ HUDService.toggleBrowserConsole().then(null, console.error);
} else {
// the Browser Console was already open
window.focus();
@@ -104,12 +104,14 @@ DevToolsStartup.prototype = {
return Services.prefs.getBoolPref(pref);
});
} catch (ex) {
+ let { console } = Cu.import("resource://gre/modules/Console.jsm", {});
console.error(ex);
return false;
}
if (!remoteDebuggingEnabled) {
let errorMsg = "Could not run chrome debugger! You need the following " +
"prefs to be set to true: " + kDebuggerPrefs.join(", ");
+ let { console } = Cu.import("resource://gre/modules/Console.jsm", {});
console.error(new Error(errorMsg));
// Dump as well, as we're doing this from a commandline, make sure people
// don't miss it:
@@ -190,7 +192,10 @@ DevToolsStartup.prototype = {
listener.open();
dump("Started debugger server on " + portOrPath + "\n");
} catch (e) {
- dump("Unable to start debugger server on " + portOrPath + ": " + e);
+ let _error = "Unable to start debugger server on " + portOrPath + ": "
+ + e;
+ Cu.reportError(_error);
+ dump(_error + "\n");
}
if (cmdLine.state == Ci.nsICommandLine.STATE_REMOTE_AUTO) {
@@ -199,12 +204,14 @@ DevToolsStartup.prototype = {
},
/* eslint-disable max-len */
- helpInfo: " --jsconsole Open the Browser Console.\n" +
- " --jsdebugger Open the Browser Toolbox.\n" +
- " --devtools Open DevTools on initial load.\n" +
- " --start-debugger-server [ws:][ <port> | <path> ] Start the debugger server on\n" +
- " a TCP port or Unix domain socket path. Defaults to TCP port\n" +
- " 6000. Use WebSocket protocol if ws: prefix is specified.\n",
+ helpInfo: " --browserconsole Open the Browser Console.\n" +
+ " --jsdebugger Open the Browser Toolbox.\n" +
+ " --devtools Open DevTools on initial load.\n" +
+ " --start-debugger-server [ws:][<port>|<path>] Start the debugger server on\n" +
+ " a TCP port or Unix domain socket path.\n" +
+ " Defaults to TCP port 6000.\n" +
+ " Use WebSocket protocol if ws: prefix\n" +
+ " is specified.\n",
/* eslint-disable max-len */
classID: Components.ID("{9e9a9283-0ce9-4e4a-8f1c-ba129a032c32}"),