Add more logging in the Browser Debugger startup path in order to investigate bug 766119; r=vporof
This commit is contained in:
@@ -530,6 +530,7 @@ ChromeDebuggerProcess.prototype = {
|
|||||||
|
|
||||||
let file = Services.dirsvc.get("XREExeF", Ci.nsIFile);
|
let file = Services.dirsvc.get("XREExeF", Ci.nsIFile);
|
||||||
|
|
||||||
|
dumpn("Initializing chrome debugging process");
|
||||||
let process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
|
let process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
|
||||||
process.init(file);
|
process.init(file);
|
||||||
|
|
||||||
@@ -537,6 +538,7 @@ ChromeDebuggerProcess.prototype = {
|
|||||||
"-no-remote", "-P", this._dbgProfile.name,
|
"-no-remote", "-P", this._dbgProfile.name,
|
||||||
"-chrome", DBG_XUL];
|
"-chrome", DBG_XUL];
|
||||||
|
|
||||||
|
dumpn("Running chrome debugging process");
|
||||||
process.runwAsync(args, args.length, { observe: this.close.bind(this) });
|
process.runwAsync(args, args.length, { observe: this.close.bind(this) });
|
||||||
this._dbgProcess = process;
|
this._dbgProcess = process;
|
||||||
|
|
||||||
@@ -549,6 +551,7 @@ ChromeDebuggerProcess.prototype = {
|
|||||||
* Closes the remote debugger, removing the profile and killing the process.
|
* Closes the remote debugger, removing the profile and killing the process.
|
||||||
*/
|
*/
|
||||||
close: function RDP_close() {
|
close: function RDP_close() {
|
||||||
|
dumpn("Closing chrome debugging process");
|
||||||
if (!this.globalUI) {
|
if (!this.globalUI) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -608,3 +611,21 @@ XPCOMUtils.defineLazyGetter(Prefs, "remoteHost", function() {
|
|||||||
XPCOMUtils.defineLazyGetter(Prefs, "remotePort", function() {
|
XPCOMUtils.defineLazyGetter(Prefs, "remotePort", function() {
|
||||||
return Services.prefs.getIntPref("devtools.debugger.remote-port");
|
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ function test() {
|
|||||||
gDebuggee = aDebuggee;
|
gDebuggee = aDebuggee;
|
||||||
gProcess = aProcess;
|
gProcess = aProcess;
|
||||||
|
|
||||||
|
info("Starting test");
|
||||||
testSimpleCall();
|
testSimpleCall();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -218,7 +218,9 @@ function debug_chrome(aURL, aOnClosing, aOnDebugging) {
|
|||||||
gBrowser.selectedTab = gTab;
|
gBrowser.selectedTab = gTab;
|
||||||
let debuggee = tab.linkedBrowser.contentWindow.wrappedJSObject;
|
let debuggee = tab.linkedBrowser.contentWindow.wrappedJSObject;
|
||||||
|
|
||||||
|
info("Opening Browser Debugger");
|
||||||
DebuggerUI.toggleChromeDebugger(aOnClosing, function dbgRan(process) {
|
DebuggerUI.toggleChromeDebugger(aOnClosing, function dbgRan(process) {
|
||||||
|
info("Browser Debugger has started");
|
||||||
|
|
||||||
// Wait for the remote debugging process to start...
|
// Wait for the remote debugging process to start...
|
||||||
aOnDebugging(tab, debuggee, process);
|
aOnDebugging(tab, debuggee, process);
|
||||||
|
|||||||
Reference in New Issue
Block a user