devtools.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. # -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
  2. # This Source Code Form is subject to the terms of the Mozilla Public
  3. # License, v. 2.0. If a copy of the MPL was not distributed with this
  4. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  5. // Developer edition promo preferences
  6. pref("devtools.devedition.promo.shown", false);
  7. pref("devtools.devedition.promo.url", "https://www.mozilla.org/firefox/developer/?utm_source=firefox-dev-tools&utm_medium=firefox-browser&utm_content=betadoorhanger");
  8. // Only potentially show in beta release
  9. #if MOZ_UPDATE_CHANNEL == beta
  10. pref("devtools.devedition.promo.enabled", true);
  11. #else
  12. pref("devtools.devedition.promo.enabled", false);
  13. #endif
  14. // DevTools development workflow
  15. pref("devtools.loader.hotreload", false);
  16. // Developer toolbar preferences
  17. pref("devtools.toolbar.enabled", true);
  18. pref("devtools.toolbar.visible", false);
  19. // Toolbox preferences
  20. pref("devtools.toolbox.footer.height", 250);
  21. pref("devtools.toolbox.sidebar.width", 500);
  22. pref("devtools.toolbox.host", "bottom");
  23. pref("devtools.toolbox.previousHost", "side");
  24. pref("devtools.toolbox.selectedTool", "webconsole");
  25. pref("devtools.toolbox.toolbarSpec", '["splitconsole", "paintflashing toggle","scratchpad","resize toggle","screenshot --fullpage", "rulers", "measure"]');
  26. pref("devtools.toolbox.sideEnabled", true);
  27. pref("devtools.toolbox.zoomValue", "1");
  28. pref("devtools.toolbox.splitconsoleEnabled", false);
  29. pref("devtools.toolbox.splitconsoleHeight", 100);
  30. // Toolbox Button preferences
  31. pref("devtools.command-button-frames.enabled", true);
  32. pref("devtools.command-button-splitconsole.enabled", true);
  33. pref("devtools.command-button-paintflashing.enabled", false);
  34. pref("devtools.command-button-scratchpad.enabled", false);
  35. pref("devtools.command-button-responsive.enabled", true);
  36. pref("devtools.command-button-screenshot.enabled", false);
  37. pref("devtools.command-button-rulers.enabled", false);
  38. pref("devtools.command-button-measure.enabled", false);
  39. pref("devtools.command-button-noautohide.enabled", false);
  40. // Inspector preferences
  41. // Enable the Inspector
  42. pref("devtools.inspector.enabled", true);
  43. // What was the last active sidebar in the inspector
  44. pref("devtools.inspector.activeSidebar", "ruleview");
  45. pref("devtools.inspector.remote", false);
  46. // Collapse pseudo-elements by default in the rule-view
  47. pref("devtools.inspector.show_pseudo_elements", false);
  48. // The default size for image preview tooltips in the rule-view/computed-view/markup-view
  49. pref("devtools.inspector.imagePreviewTooltipSize", 300);
  50. // Enable user agent style inspection in rule-view
  51. pref("devtools.inspector.showUserAgentStyles", false);
  52. // Show all native anonymous content (like controls in <video> tags)
  53. pref("devtools.inspector.showAllAnonymousContent", false);
  54. // Enable the MDN docs tooltip
  55. pref("devtools.inspector.mdnDocsTooltip.enabled", true);
  56. // Enable the Font Inspector
  57. pref("devtools.fontinspector.enabled", true);
  58. // Enable the Layout View
  59. pref("devtools.layoutview.enabled", false);
  60. // By how many times eyedropper will magnify pixels
  61. pref("devtools.eyedropper.zoom", 6);
  62. // Enable to collapse attributes that are too long.
  63. pref("devtools.markup.collapseAttributes", true);
  64. // Length to collapse attributes
  65. pref("devtools.markup.collapseAttributeLength", 120);
  66. // DevTools default color unit
  67. pref("devtools.defaultColorUnit", "authored");
  68. // Enable the Responsive UI tool
  69. pref("devtools.responsiveUI.no-reload-notification", false);
  70. // Enable the Debugger
  71. pref("devtools.debugger.enabled", true);
  72. pref("devtools.debugger.chrome-debugging-host", "localhost");
  73. pref("devtools.debugger.chrome-debugging-port", 6080);
  74. pref("devtools.debugger.chrome-debugging-websocket", false);
  75. pref("devtools.debugger.remote-host", "localhost");
  76. pref("devtools.debugger.remote-timeout", 20000);
  77. pref("devtools.debugger.pause-on-exceptions", false);
  78. pref("devtools.debugger.ignore-caught-exceptions", true);
  79. pref("devtools.debugger.source-maps-enabled", true);
  80. pref("devtools.debugger.client-source-maps-enabled", true);
  81. pref("devtools.debugger.pretty-print-enabled", true);
  82. pref("devtools.debugger.auto-pretty-print", false);
  83. pref("devtools.debugger.auto-black-box", true);
  84. pref("devtools.debugger.workers", false);
  85. #ifdef RELEASE_OR_BETA
  86. pref("devtools.debugger.new-debugger-frontend", false);
  87. #else
  88. pref("devtools.debugger.new-debugger-frontend", true);
  89. #endif
  90. // The default Debugger UI settings
  91. pref("devtools.debugger.ui.panes-workers-and-sources-width", 200);
  92. pref("devtools.debugger.ui.panes-instruments-width", 300);
  93. pref("devtools.debugger.ui.panes-visible-on-startup", false);
  94. pref("devtools.debugger.ui.variables-sorting-enabled", true);
  95. pref("devtools.debugger.ui.variables-only-enum-visible", false);
  96. pref("devtools.debugger.ui.variables-searchbox-visible", false);
  97. // Enable the Memory tools
  98. pref("devtools.memory.enabled", true);
  99. pref("devtools.memory.custom-census-displays", "{}");
  100. pref("devtools.memory.custom-label-displays", "{}");
  101. pref("devtools.memory.custom-tree-map-displays", "{}");
  102. pref("devtools.memory.max-individuals", 1000);
  103. pref("devtools.memory.max-retaining-paths", 10);
  104. // Enable the Performance tools
  105. pref("devtools.performance.enabled", true);
  106. // The default Performance UI settings
  107. pref("devtools.performance.memory.sample-probability", "0.05");
  108. // Can't go higher than this without causing internal allocation overflows while
  109. // serializing the allocations data over the RDP.
  110. pref("devtools.performance.memory.max-log-length", 125000);
  111. pref("devtools.performance.timeline.hidden-markers",
  112. "[\"Composite\",\"CompositeForwardTransaction\"]");
  113. pref("devtools.performance.profiler.buffer-size", 10000000);
  114. pref("devtools.performance.profiler.sample-frequency-khz", 1);
  115. pref("devtools.performance.ui.invert-call-tree", true);
  116. pref("devtools.performance.ui.invert-flame-graph", false);
  117. pref("devtools.performance.ui.flatten-tree-recursion", true);
  118. pref("devtools.performance.ui.show-platform-data", false);
  119. pref("devtools.performance.ui.show-idle-blocks", true);
  120. pref("devtools.performance.ui.enable-memory", false);
  121. pref("devtools.performance.ui.enable-allocations", false);
  122. pref("devtools.performance.ui.enable-framerate", true);
  123. pref("devtools.performance.ui.show-jit-optimizations", false);
  124. pref("devtools.performance.ui.show-triggers-for-gc-types",
  125. "TOO_MUCH_MALLOC ALLOC_TRIGGER LAST_DITCH EAGER_ALLOC_TRIGGER");
  126. // Temporary pref disabling memory flame views
  127. // TODO remove once we have flame charts via bug 1148663
  128. pref("devtools.performance.ui.enable-memory-flame", false);
  129. // Enable experimental options in the UI only in Nightly
  130. #if defined(NIGHTLY_BUILD)
  131. pref("devtools.performance.ui.experimental", true);
  132. #else
  133. pref("devtools.performance.ui.experimental", false);
  134. #endif
  135. // The default cache UI setting
  136. pref("devtools.cache.disabled", false);
  137. // The default service workers UI setting
  138. pref("devtools.serviceWorkers.testing.enabled", false);
  139. // Enable the Network Monitor
  140. pref("devtools.netmonitor.enabled", true);
  141. // The default Network Monitor UI settings
  142. pref("devtools.netmonitor.panes-network-details-width", 550);
  143. pref("devtools.netmonitor.panes-network-details-height", 450);
  144. pref("devtools.netmonitor.statistics", true);
  145. pref("devtools.netmonitor.filters", "[\"all\"]");
  146. // The default Network monitor HAR export setting
  147. pref("devtools.netmonitor.har.defaultLogDir", "");
  148. pref("devtools.netmonitor.har.defaultFileName", "Archive %y-%m-%d %H-%M-%S");
  149. pref("devtools.netmonitor.har.jsonp", false);
  150. pref("devtools.netmonitor.har.jsonpCallback", "");
  151. pref("devtools.netmonitor.har.includeResponseBodies", true);
  152. pref("devtools.netmonitor.har.compress", false);
  153. pref("devtools.netmonitor.har.forceExport", false);
  154. pref("devtools.netmonitor.har.pageLoadedTimeout", 1500);
  155. pref("devtools.netmonitor.har.enableAutoExportToFile", false);
  156. // Scratchpad settings
  157. // - recentFileMax: The maximum number of recently-opened files
  158. // stored. Setting this preference to 0 will not
  159. // clear any recent files, but rather hide the
  160. // 'Open Recent'-menu.
  161. // - lineNumbers: Whether to show line numbers or not.
  162. // - wrapText: Whether to wrap text or not.
  163. // - showTrailingSpace: Whether to highlight trailing space or not.
  164. // - editorFontSize: Editor font size configuration.
  165. // - enableAutocompletion: Whether to enable JavaScript autocompletion.
  166. pref("devtools.scratchpad.recentFilesMax", 10);
  167. pref("devtools.scratchpad.lineNumbers", true);
  168. pref("devtools.scratchpad.wrapText", false);
  169. pref("devtools.scratchpad.showTrailingSpace", false);
  170. pref("devtools.scratchpad.editorFontSize", 12);
  171. pref("devtools.scratchpad.enableAutocompletion", true);
  172. // Enable the Storage Inspector
  173. pref("devtools.storage.enabled", false);
  174. // Enable the Style Editor.
  175. pref("devtools.styleeditor.enabled", true);
  176. pref("devtools.styleeditor.source-maps-enabled", true);
  177. pref("devtools.styleeditor.autocompletion-enabled", true);
  178. pref("devtools.styleeditor.showMediaSidebar", true);
  179. pref("devtools.styleeditor.mediaSidebarWidth", 238);
  180. pref("devtools.styleeditor.navSidebarWidth", 245);
  181. pref("devtools.styleeditor.transitions", true);
  182. // Enable the Shader Editor.
  183. pref("devtools.shadereditor.enabled", false);
  184. // Enable the Canvas Debugger.
  185. pref("devtools.canvasdebugger.enabled", false);
  186. // Enable the Web Audio Editor
  187. pref("devtools.webaudioeditor.enabled", false);
  188. // Enable Scratchpad
  189. pref("devtools.scratchpad.enabled", false);
  190. // Make sure the DOM panel is hidden by default
  191. pref("devtools.dom.enabled", false);
  192. // Web Audio Editor Inspector Width should be a preference
  193. pref("devtools.webaudioeditor.inspectorWidth", 300);
  194. // Default theme ("dark" or "light")
  195. sticky_pref("devtools.theme", "light");
  196. // Web console filters
  197. pref("devtools.webconsole.filter.error", true);
  198. pref("devtools.webconsole.filter.warn", true);
  199. pref("devtools.webconsole.filter.info", true);
  200. pref("devtools.webconsole.filter.log", true);
  201. pref("devtools.webconsole.filter.debug", true);
  202. pref("devtools.webconsole.filter.net", false);
  203. pref("devtools.webconsole.filter.netxhr", false);
  204. pref("devtools.webconsole.filter.saveBodies", true);
  205. // Deprecated - old console frontend
  206. pref("devtools.webconsole.filter.network", true);
  207. pref("devtools.webconsole.filter.networkinfo", false);
  208. pref("devtools.webconsole.filter.netwarn", true);
  209. pref("devtools.webconsole.filter.csserror", true);
  210. pref("devtools.webconsole.filter.cssparser", false);
  211. pref("devtools.webconsole.filter.csslog", false);
  212. pref("devtools.webconsole.filter.exception", true);
  213. pref("devtools.webconsole.filter.jswarn", true);
  214. pref("devtools.webconsole.filter.jslog", false);
  215. pref("devtools.webconsole.filter.secerror", true);
  216. pref("devtools.webconsole.filter.secwarn", true);
  217. pref("devtools.webconsole.filter.serviceworkers", true);
  218. pref("devtools.webconsole.filter.sharedworkers", false);
  219. pref("devtools.webconsole.filter.windowlessworkers", false);
  220. pref("devtools.webconsole.filter.servererror", false);
  221. pref("devtools.webconsole.filter.serverwarn", false);
  222. pref("devtools.webconsole.filter.serverinfo", false);
  223. pref("devtools.webconsole.filter.serverlog", false);
  224. // Remember the Browser Console filters
  225. pref("devtools.browserconsole.filter.network", true);
  226. pref("devtools.browserconsole.filter.networkinfo", false);
  227. pref("devtools.browserconsole.filter.netwarn", true);
  228. pref("devtools.browserconsole.filter.netxhr", false);
  229. pref("devtools.browserconsole.filter.saveBodies", false);
  230. pref("devtools.browserconsole.filter.csserror", true);
  231. pref("devtools.browserconsole.filter.cssparser", false);
  232. pref("devtools.browserconsole.filter.csslog", false);
  233. pref("devtools.browserconsole.filter.exception", true);
  234. pref("devtools.browserconsole.filter.jswarn", true);
  235. pref("devtools.browserconsole.filter.jslog", true);
  236. pref("devtools.browserconsole.filter.error", true);
  237. pref("devtools.browserconsole.filter.warn", true);
  238. pref("devtools.browserconsole.filter.info", true);
  239. pref("devtools.browserconsole.filter.log", true);
  240. pref("devtools.browserconsole.filter.secerror", true);
  241. pref("devtools.browserconsole.filter.secwarn", true);
  242. pref("devtools.browserconsole.filter.serviceworkers", true);
  243. pref("devtools.browserconsole.filter.sharedworkers", true);
  244. pref("devtools.browserconsole.filter.windowlessworkers", true);
  245. pref("devtools.browserconsole.filter.servererror", false);
  246. pref("devtools.browserconsole.filter.serverwarn", false);
  247. pref("devtools.browserconsole.filter.serverinfo", false);
  248. pref("devtools.browserconsole.filter.serverlog", false);
  249. // Web console filter settings bar
  250. pref("devtools.webconsole.ui.filterbar", false);
  251. // Max number of inputs to store in web console history.
  252. pref("devtools.webconsole.inputHistoryCount", 50);
  253. // Persistent logging: |true| if you want the Web Console to keep all of the
  254. // logged messages after reloading the page, |false| if you want the output to
  255. // be cleared each time page navigation happens.
  256. pref("devtools.webconsole.persistlog", false);
  257. // Web Console timestamp: |true| if you want the logs and instructions
  258. // in the Web Console to display a timestamp, or |false| to not display
  259. // any timestamps.
  260. pref("devtools.webconsole.timestampMessages", false);
  261. // Web Console automatic multiline mode: |true| if you want incomplete statements
  262. // to automatically trigger multiline editing (equivalent to shift + enter).
  263. pref("devtools.webconsole.autoMultiline", true);
  264. // Enable the experimental webconsole frontend
  265. #if defined(NIGHTLY_BUILD)
  266. pref("devtools.webconsole.new-frontend-enabled", true);
  267. #else
  268. pref("devtools.webconsole.new-frontend-enabled", false);
  269. #endif
  270. // Enable the experimental support for source maps in console (work in progress)
  271. pref("devtools.sourcemap.locations.enabled", false);
  272. // The number of lines that are displayed in the web console.
  273. pref("devtools.hud.loglimit", 1000);
  274. // The number of lines that are displayed in the web console for the Net,
  275. // CSS, JS and Web Developer categories. These defaults should be kept in sync
  276. // with DEFAULT_LOG_LIMIT in the webconsole frontend.
  277. pref("devtools.hud.loglimit.network", 1000);
  278. pref("devtools.hud.loglimit.cssparser", 1000);
  279. pref("devtools.hud.loglimit.exception", 1000);
  280. pref("devtools.hud.loglimit.console", 1000);
  281. // The developer tools editor configuration:
  282. // - tabsize: how many spaces to use when a Tab character is displayed.
  283. // - expandtab: expand Tab characters to spaces.
  284. // - keymap: which keymap to use (can be 'default', 'emacs' or 'vim')
  285. // - autoclosebrackets: whether to permit automatic bracket/quote closing.
  286. // - detectindentation: whether to detect the indentation from the file
  287. // - enableCodeFolding: Whether to enable code folding or not.
  288. pref("devtools.editor.tabsize", 2);
  289. pref("devtools.editor.expandtab", true);
  290. pref("devtools.editor.keymap", "default");
  291. pref("devtools.editor.autoclosebrackets", true);
  292. pref("devtools.editor.detectindentation", true);
  293. pref("devtools.editor.enableCodeFolding", true);
  294. pref("devtools.editor.autocomplete", true);
  295. // Pref to store the browser version at the time of a telemetry ping for an
  296. // opened developer tool. This allows us to ping telemetry just once per browser
  297. // version for each user.
  298. pref("devtools.telemetry.tools.opened.version", "{}");
  299. // Enable the JSON View tool (an inspector for application/json documents)
  300. pref("devtools.jsonview.enabled", true);
  301. // Enable the HTML responsive design mode for all channels.
  302. pref("devtools.responsive.html.enabled", true);