diff --git a/browser/devtools/debugger/DebuggerUI.jsm b/browser/devtools/debugger/DebuggerUI.jsm index da4e6335ff9f..91b5800d4c9b 100644 --- a/browser/devtools/debugger/DebuggerUI.jsm +++ b/browser/devtools/debugger/DebuggerUI.jsm @@ -530,6 +530,7 @@ ChromeDebuggerProcess.prototype = { let file = Services.dirsvc.get("XREExeF", Ci.nsIFile); + dumpn("Initializing chrome debugging process"); let process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess); process.init(file); @@ -537,6 +538,7 @@ ChromeDebuggerProcess.prototype = { "-no-remote", "-P", this._dbgProfile.name, "-chrome", DBG_XUL]; + dumpn("Running chrome debugging process"); process.runwAsync(args, args.length, { observe: this.close.bind(this) }); this._dbgProcess = process; @@ -549,6 +551,7 @@ ChromeDebuggerProcess.prototype = { * Closes the remote debugger, removing the profile and killing the process. */ close: function RDP_close() { + dumpn("Closing chrome debugging process"); if (!this.globalUI) { return; } @@ -608,3 +611,21 @@ XPCOMUtils.defineLazyGetter(Prefs, "remoteHost", function() { XPCOMUtils.defineLazyGetter(Prefs, "remotePort", function() { return Services.prefs.getIntPref("devtools.debugger.remote-port"); }); + +/** + * Gets the preferred default remote debugging port. + * @return number + */ +XPCOMUtils.defineLazyGetter(Prefs, "wantLogging", function() { + return Services.prefs.getBoolPref("devtools.debugger.log"); +}); + +/** + * Helper method for debugging. + * @param string + */ +function dumpn(str) { + if (Prefs.wantLogging) { + dump("DBG-FRONTEND: " + str + "\n"); + } +} diff --git a/browser/devtools/debugger/test/browser_dbg_createChrome.js b/browser/devtools/debugger/test/browser_dbg_createChrome.js index d8e9c51a2c8d..7b16cbfdfd5d 100644 --- a/browser/devtools/debugger/test/browser_dbg_createChrome.js +++ b/browser/devtools/debugger/test/browser_dbg_createChrome.js @@ -16,6 +16,7 @@ function test() { gDebuggee = aDebuggee; gProcess = aProcess; + info("Starting test"); testSimpleCall(); }); } diff --git a/browser/devtools/debugger/test/head.js b/browser/devtools/debugger/test/head.js index 8bd6c9037044..7d465bd24445 100644 --- a/browser/devtools/debugger/test/head.js +++ b/browser/devtools/debugger/test/head.js @@ -218,7 +218,9 @@ function debug_chrome(aURL, aOnClosing, aOnDebugging) { gBrowser.selectedTab = gTab; let debuggee = tab.linkedBrowser.contentWindow.wrappedJSObject; + info("Opening Browser Debugger"); DebuggerUI.toggleChromeDebugger(aOnClosing, function dbgRan(process) { + info("Browser Debugger has started"); // Wait for the remote debugging process to start... aOnDebugging(tab, debuggee, process);