Bug 1031404 - Browser Toolbox: Open on last used panel by default;r=jryans,r=Gijs

This commit is contained in:
Brian Grinstead 2014-11-24 16:13:53 -08:00
parent 8576ab88f4
commit 6bee3b13a0
3 changed files with 11 additions and 3 deletions

View File

@ -159,11 +159,14 @@ BrowserToolboxProcess.prototype = {
try {
debuggingProfileDir.create(Ci.nsIFile.DIRECTORY_TYPE, 0o755);
} catch (ex) {
if (ex.result !== Cr.NS_ERROR_FILE_ALREADY_EXISTS) {
// Don't re-copy over the prefs again if this profile already exists
if (ex.result === Cr.NS_ERROR_FILE_ALREADY_EXISTS) {
this._dbgProfilePath = debuggingProfileDir.path;
} else {
dumpn("Error trying to create a profile directory, failing.");
dumpn("Error: " + (ex.message || ex));
return;
}
return;
}
this._dbgProfilePath = debuggingProfileDir.path;

View File

@ -71,9 +71,13 @@ function openToolbox(form) {
};
devtools.TargetFactory.forRemoteTab(options).then(target => {
let frame = document.getElementById("toolbox-iframe");
let lastSelectedTool = "jsdebugger";
try {
lastSelectedTool = Services.prefs.getCharPref("devtools.toolbox.selectedTool");
} catch(e) {}
let options = { customIframe: frame };
gDevTools.showToolbox(target,
"jsdebugger",
lastSelectedTool,
devtools.Toolbox.HostType.CUSTOM,
options)
.then(onNewToolbox);

View File

@ -23,6 +23,7 @@ user_pref("shell.checkDefaultClient", false);
user_pref("browser.warnOnQuit", false);
user_pref("accessibility.typeaheadfind.autostart", false);
user_pref("javascript.options.showInConsole", true);
user_pref("devtools.toolbox.selectedTool", "jsdebugger");
user_pref("devtools.errorconsole.enabled", true);
user_pref("devtools.debugger.remote-port", 6023);
user_pref("layout.debug.enable_data_xbl", true);