Bug 1328693 - Extract debugger preferences. r=jryans
authorJason Laster <jason.laster.11@gmail.com>
Wed, 25 Jan 2017 06:19:00 -0500
changeset 466643 a50557f92553b859df03352edff970a97159aa24
parent 466642 f54d14f58ce76c6749f6de78bf6551a8492abe7d
child 466644 862bc2b2553e0a65ac080e49d4279f4faba4bc76
push id42948
push userbmo:gasolin@mozilla.com
push dateThu, 26 Jan 2017 07:49:21 +0000
reviewersjryans
bugs1328693
milestone54.0a1
Bug 1328693 - Extract debugger preferences. r=jryans
b2g/installer/package-manifest.in
browser/installer/package-manifest.in
devtools/client/preferences/debugger.js
devtools/client/preferences/devtools.js
devtools/client/preferences/moz.build
devtools/client/shared/shim/Services.js
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -598,16 +598,17 @@
 #endif
 #endif
 
 ; DevTools
 @RESPATH@/chrome/devtools@JAREXT@
 @RESPATH@/chrome/devtools.manifest
 #ifdef MOZ_GRAPHENE
 @RESPATH@/@PREF_DIR@/devtools.js
+@RESPATH@/@PREF_DIR@/debugger.js
 #endif
 
 ; shell icons
 #ifdef XP_UNIX
 #ifndef XP_MACOSX
 @RESPATH@/icons/*.xpm
 @RESPATH@/icons/*.png
 #endif
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -612,16 +612,17 @@
 @RESPATH@/browser/chrome/webide@JAREXT@
 @RESPATH@/browser/chrome/webide.manifest
 @RESPATH@/browser/@PREF_DIR@/webide-prefs.js
 
 ; DevTools
 @RESPATH@/browser/chrome/devtools@JAREXT@
 @RESPATH@/browser/chrome/devtools.manifest
 @RESPATH@/browser/@PREF_DIR@/devtools.js
+@RESPATH@/browser/@PREF_DIR@/debugger.js
 
 ; shell icons
 #ifdef XP_UNIX
 #ifndef XP_MACOSX
 ; shell icons
 @RESPATH@/browser/icons/*.png
 #ifdef MOZ_UPDATER
 ; updater icon
new file mode 100644
--- /dev/null
+++ b/devtools/client/preferences/debugger.js
@@ -0,0 +1,41 @@
+# -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifdef RELEASE_OR_BETA
+pref("devtools.debugger.new-debugger-frontend", false);
+#else
+pref("devtools.debugger.new-debugger-frontend", true);
+#endif
+
+// Enable the Debugger
+pref("devtools.debugger.enabled", true);
+pref("devtools.debugger.chrome-debugging-host", "localhost");
+pref("devtools.debugger.chrome-debugging-port", 6080);
+pref("devtools.debugger.chrome-debugging-websocket", false);
+pref("devtools.debugger.remote-host", "localhost");
+pref("devtools.debugger.remote-timeout", 20000);
+pref("devtools.debugger.pause-on-exceptions", false);
+pref("devtools.debugger.ignore-caught-exceptions", true);
+pref("devtools.debugger.source-maps-enabled", true);
+pref("devtools.debugger.client-source-maps-enabled", true);
+pref("devtools.debugger.pretty-print-enabled", true);
+pref("devtools.debugger.auto-pretty-print", false);
+pref("devtools.debugger.auto-black-box", true);
+pref("devtools.debugger.workers", false);
+
+// The default Debugger UI settings
+pref("devtools.debugger.ui.panes-workers-and-sources-width", 200);
+pref("devtools.debugger.ui.panes-instruments-width", 300);
+pref("devtools.debugger.ui.panes-visible-on-startup", false);
+pref("devtools.debugger.ui.variables-sorting-enabled", true);
+pref("devtools.debugger.ui.variables-only-enum-visible", false);
+pref("devtools.debugger.ui.variables-searchbox-visible", false);
+pref("devtools.debugger.call-stack-visible", false);
+pref("devtools.debugger.scopes-visible", false);
+pref("devtools.debugger.start-panel-collapsed", false);
+pref("devtools.debugger.end-panel-collapsed", false);
+pref("devtools.debugger.tabs", "[]");
+pref("devtools.debugger.pending-selected-location", "{}");
+
--- a/devtools/client/preferences/devtools.js
+++ b/devtools/client/preferences/devtools.js
@@ -87,52 +87,16 @@ pref("devtools.markup.collapseAttributes
 pref("devtools.markup.collapseAttributeLength", 120);
 
 // DevTools default color unit
 pref("devtools.defaultColorUnit", "authored");
 
 // Enable the Responsive UI tool
 pref("devtools.responsiveUI.no-reload-notification", false);
 
-// Enable the Debugger
-pref("devtools.debugger.enabled", true);
-pref("devtools.debugger.chrome-debugging-host", "localhost");
-pref("devtools.debugger.chrome-debugging-port", 6080);
-pref("devtools.debugger.chrome-debugging-websocket", false);
-pref("devtools.debugger.remote-host", "localhost");
-pref("devtools.debugger.remote-timeout", 20000);
-pref("devtools.debugger.pause-on-exceptions", false);
-pref("devtools.debugger.ignore-caught-exceptions", true);
-pref("devtools.debugger.source-maps-enabled", true);
-pref("devtools.debugger.client-source-maps-enabled", true);
-pref("devtools.debugger.pretty-print-enabled", true);
-pref("devtools.debugger.auto-pretty-print", false);
-pref("devtools.debugger.auto-black-box", true);
-pref("devtools.debugger.workers", false);
-
-#ifdef RELEASE_OR_BETA
-pref("devtools.debugger.new-debugger-frontend", false);
-#else
-pref("devtools.debugger.new-debugger-frontend", true);
-#endif
-
-// The default Debugger UI settings
-pref("devtools.debugger.ui.panes-workers-and-sources-width", 200);
-pref("devtools.debugger.ui.panes-instruments-width", 300);
-pref("devtools.debugger.ui.panes-visible-on-startup", false);
-pref("devtools.debugger.ui.variables-sorting-enabled", true);
-pref("devtools.debugger.ui.variables-only-enum-visible", false);
-pref("devtools.debugger.ui.variables-searchbox-visible", false);
-pref("devtools.debugger.call-stack-visible", false);
-pref("devtools.debugger.scopes-visible", false);
-pref("devtools.debugger.start-panel-collapsed", false);
-pref("devtools.debugger.end-panel-collapsed", false);
-pref("devtools.debugger.tabs", "[]");
-pref("devtools.debugger.pending-selected-location", "{}");
-
 // Enable the Memory tools
 pref("devtools.memory.enabled", true);
 
 pref("devtools.memory.custom-census-displays", "{}");
 pref("devtools.memory.custom-label-displays", "{}");
 pref("devtools.memory.custom-tree-map-displays", "{}");
 
 pref("devtools.memory.max-individuals", 1000);
--- a/devtools/client/preferences/moz.build
+++ b/devtools/client/preferences/moz.build
@@ -1,9 +1,10 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 JS_PREFERENCE_PP_FILES += [
-    'devtools.js',
+    'debugger.js',
+    'devtools.js'
 ]
--- a/devtools/client/shared/shim/Services.js
+++ b/devtools/client/shared/shim/Services.js
@@ -432,16 +432,18 @@ PrefBranch.prototype = {
   /**
    * Helper function to initialize the root PrefBranch.
    */
   _initializeRoot: function () {
     if (Services._defaultPrefsEnabled) {
       /* eslint-disable no-eval */
       let devtools = require("raw!prefs!devtools/client/preferences/devtools");
       eval(devtools);
+      const dbg = require("raw!prefs!devtools/client/preferences/debugger");
+      eval(dbg);
       let all = require("raw!prefs!modules/libpref/init/all");
       eval(all);
       /* eslint-enable no-eval */
     }
 
     // Read the prefs from local storage and create the local
     // representations.
     for (let i = 0; i < localStorage.length; ++i) {