зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1031404 - Browser Toolbox: Open on last used panel by default;r=jryans,r=Gijs
This commit is contained in:
Родитель
e343a157bd
Коммит
588091934f
|
@ -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;
|
||||
|
|
|
@ -71,9 +71,21 @@ function openToolbox(form) {
|
|||
};
|
||||
devtools.TargetFactory.forRemoteTab(options).then(target => {
|
||||
let frame = document.getElementById("toolbox-iframe");
|
||||
let selectedTool = "jsdebugger";
|
||||
|
||||
try {
|
||||
// Remember the last panel that was used inside of this profile.
|
||||
selectedTool = Services.prefs.getCharPref("devtools.toolbox.selectedTool");
|
||||
} catch(e) {}
|
||||
|
||||
try {
|
||||
// But if we are testing, then it should always open the debugger panel.
|
||||
selectedTool = Services.prefs.getCharPref("devtools.browsertoolbox.panel");
|
||||
} catch(e) {}
|
||||
|
||||
let options = { customIframe: frame };
|
||||
gDevTools.showToolbox(target,
|
||||
"jsdebugger",
|
||||
selectedTool,
|
||||
devtools.Toolbox.HostType.CUSTOM,
|
||||
options)
|
||||
.then(onNewToolbox);
|
||||
|
|
|
@ -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.browsertoolbox.panel", "jsdebugger");
|
||||
user_pref("devtools.errorconsole.enabled", true);
|
||||
user_pref("devtools.debugger.remote-port", 6023);
|
||||
user_pref("layout.debug.enable_data_xbl", true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче