Bug 1314057 - Remove old debugger assets. r=jdescottes
authorDavid Walsh <dwalsh@mozilla.com>
Mon, 22 Oct 2018 17:19:00 -0500
changeset 490827 9fb4fd49a8189f4da9998f9cf80d94f699c6b739
parent 490826 0a73fd515a35eb7337d4c8d91aa70275c542efa4
child 490828 ae266baf08fe02facf73233fccf30140a42ef0f4
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersjdescottes
bugs1314057
milestone65.0a1
Bug 1314057 - Remove old debugger assets. r=jdescottes
devtools/client/debugger/content/actions/breakpoints.js
devtools/client/debugger/content/actions/event-listeners.js
devtools/client/debugger/content/actions/moz.build
devtools/client/debugger/content/actions/sources.js
devtools/client/debugger/content/constants.js
devtools/client/debugger/content/globalActions.js
devtools/client/debugger/content/moz.build
devtools/client/debugger/content/queries.js
devtools/client/debugger/content/reducers/async-requests.js
devtools/client/debugger/content/reducers/breakpoints.js
devtools/client/debugger/content/reducers/event-listeners.js
devtools/client/debugger/content/reducers/index.js
devtools/client/debugger/content/reducers/moz.build
devtools/client/debugger/content/reducers/sources.js
devtools/client/debugger/content/tooltip/Tooltip.js
devtools/client/debugger/content/tooltip/VariableContentHelper.js
devtools/client/debugger/content/tooltip/moz.build
devtools/client/debugger/content/tooltip/tooltips-old.css
devtools/client/debugger/content/utils.js
devtools/client/debugger/content/views/event-listeners-view.js
devtools/client/debugger/content/views/moz.build
devtools/client/debugger/content/views/sources-view.js
devtools/client/debugger/debugger-controller.js
devtools/client/debugger/debugger-view.js
devtools/client/debugger/debugger.css
devtools/client/debugger/index.xul
devtools/client/debugger/moz.build
devtools/client/debugger/new/test/mochitest/head.js
devtools/client/debugger/panel.js
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon3/lib/main.js
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon3/package.json
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/bootstrap.js
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/chrome.manifest
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/install.rdf
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/test.jsm
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/test.xul
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/test2.jsm
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/test2.xul
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/testxul.js
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/testxul2.js
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/bootstrap.js
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/chrome.manifest
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/install.rdf
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/test.jsm
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/test.xul
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/test2.jsm
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/test2.xul
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/testxul.js
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/testxul2.js
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon_webext_contentscript/manifest.json
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon_webext_contentscript/webext-content-script.js
devtools/client/debugger/test/mochitest/addon-webext-contentscript.xpi
devtools/client/debugger/test/mochitest/addon5.xpi
devtools/client/debugger/test/mochitest/browser.ini
devtools/client/debugger/test/mochitest/browser2.ini
devtools/client/debugger/test/mochitest/browser_dbg_aaa_run_first_leaktest.js
devtools/client/debugger/test/mochitest/browser_dbg_addon-modules-unpacked.js
devtools/client/debugger/test/mochitest/browser_dbg_addon-modules.js
devtools/client/debugger/test/mochitest/browser_dbg_bfcache.js
devtools/client/debugger/test/mochitest/browser_dbg_break-in-anon.js
devtools/client/debugger/test/mochitest/browser_dbg_break-on-next-console.js
devtools/client/debugger/test/mochitest/browser_dbg_break-on-next.js
devtools/client/debugger/test/mochitest/browser_dbg_break-unselected.js
devtools/client/debugger/test/mochitest/browser_dbg_breakpoints-editor.js
devtools/client/debugger/test/mochitest/browser_dbg_breakpoints-eval.js
devtools/client/debugger/test/mochitest/browser_dbg_breakpoints-new-script.js
devtools/client/debugger/test/mochitest/browser_dbg_breakpoints-other-tabs.js
devtools/client/debugger/test/mochitest/browser_dbg_bug-896139.js
devtools/client/debugger/test/mochitest/browser_dbg_clean-exit.js
devtools/client/debugger/test/mochitest/browser_dbg_closure-inspection.js
devtools/client/debugger/test/mochitest/browser_dbg_conditional-breakpoints-01.js
devtools/client/debugger/test/mochitest/browser_dbg_conditional-breakpoints-02.js
devtools/client/debugger/test/mochitest/browser_dbg_conditional-breakpoints-03.js
devtools/client/debugger/test/mochitest/browser_dbg_conditional-breakpoints-04.js
devtools/client/debugger/test/mochitest/browser_dbg_conditional-breakpoints-05.js
devtools/client/debugger/test/mochitest/browser_dbg_console-eval.js
devtools/client/debugger/test/mochitest/browser_dbg_console-named-eval.js
devtools/client/debugger/test/mochitest/browser_dbg_controller-evaluate-01.js
devtools/client/debugger/test/mochitest/browser_dbg_controller-evaluate-02.js
devtools/client/debugger/test/mochitest/browser_dbg_file-reload.js
devtools/client/debugger/test/mochitest/browser_dbg_host-layout.js
devtools/client/debugger/test/mochitest/browser_dbg_iframes.js
devtools/client/debugger/test/mochitest/browser_dbg_interrupts.js
devtools/client/debugger/test/mochitest/browser_dbg_jump-to-function-definition.js
devtools/client/debugger/test/mochitest/browser_dbg_on-pause-raise.js
devtools/client/debugger/test/mochitest/browser_dbg_optimized-out-vars.js
devtools/client/debugger/test/mochitest/browser_dbg_pause-resume.js
devtools/client/debugger/test/mochitest/browser_dbg_pause-warning.js
devtools/client/debugger/test/mochitest/browser_dbg_paused-keybindings.js
devtools/client/debugger/test/mochitest/browser_dbg_post-page.js
devtools/client/debugger/test/mochitest/browser_dbg_progress-listener-bug.js
devtools/client/debugger/test/mochitest/browser_dbg_server-conditional-bp-01.js
devtools/client/debugger/test/mochitest/browser_dbg_server-conditional-bp-02.js
devtools/client/debugger/test/mochitest/browser_dbg_server-conditional-bp-03.js
devtools/client/debugger/test/mochitest/browser_dbg_server-conditional-bp-04.js
devtools/client/debugger/test/mochitest/browser_dbg_server-conditional-bp-05.js
devtools/client/debugger/test/mochitest/browser_dbg_sources-bookmarklet.js
devtools/client/debugger/test/mochitest/browser_dbg_sources-cache.js
devtools/client/debugger/test/mochitest/browser_dbg_sources-iframe-reload.js
devtools/client/debugger/test/mochitest/browser_dbg_split-console-keypress.js
devtools/client/debugger/test/mochitest/browser_dbg_split-console-paused-reload.js
devtools/client/debugger/test/mochitest/browser_dbg_worker-source-map.js
devtools/client/debugger/test/mochitest/code_WorkerTargetActor.attach-worker1.js
devtools/client/debugger/test/mochitest/code_WorkerTargetActor.attach-worker2.js
devtools/client/debugger/test/mochitest/code_binary_search.coffee
devtools/client/debugger/test/mochitest/code_binary_search.js
devtools/client/debugger/test/mochitest/code_binary_search.map
devtools/client/debugger/test/mochitest/code_breakpoints-break-on-last-line-of-script-on-reload.js
devtools/client/debugger/test/mochitest/code_breakpoints-other-tabs.js
devtools/client/debugger/test/mochitest/code_bug-896139.js
devtools/client/debugger/test/mochitest/code_frame-script.js
devtools/client/debugger/test/mochitest/code_function-jump-01.js
devtools/client/debugger/test/mochitest/code_function-search-01.js
devtools/client/debugger/test/mochitest/code_function-search-02.js
devtools/client/debugger/test/mochitest/code_function-search-03.js
devtools/client/debugger/test/mochitest/code_location-changes.js
devtools/client/debugger/test/mochitest/code_math.js
devtools/client/debugger/test/mochitest/code_math.map
devtools/client/debugger/test/mochitest/code_math.min.js
devtools/client/debugger/test/mochitest/code_math_bogus_map.js
devtools/client/debugger/test/mochitest/code_same-line-functions.js
devtools/client/debugger/test/mochitest/code_script-eval.js
devtools/client/debugger/test/mochitest/code_script-switching-01.js
devtools/client/debugger/test/mochitest/code_script-switching-02.js
devtools/client/debugger/test/mochitest/code_test-editor-mode
devtools/client/debugger/test/mochitest/code_ugly-2.js
devtools/client/debugger/test/mochitest/code_ugly-3.js
devtools/client/debugger/test/mochitest/code_ugly-4.js
devtools/client/debugger/test/mochitest/code_ugly-5.js
devtools/client/debugger/test/mochitest/code_ugly-6.js
devtools/client/debugger/test/mochitest/code_ugly-7.js
devtools/client/debugger/test/mochitest/code_ugly-8
devtools/client/debugger/test/mochitest/code_ugly-8^headers^
devtools/client/debugger/test/mochitest/code_ugly.js
devtools/client/debugger/test/mochitest/code_worker-source-map.coffee
devtools/client/debugger/test/mochitest/code_worker-source-map.js
devtools/client/debugger/test/mochitest/code_worker-source-map.js.map
devtools/client/debugger/test/mochitest/code_workeractor-worker.js
devtools/client/debugger/test/mochitest/doc_WorkerTargetActor.attach-tab1.html
devtools/client/debugger/test/mochitest/doc_WorkerTargetActor.attach-tab2.html
devtools/client/debugger/test/mochitest/doc_binary_search.html
devtools/client/debugger/test/mochitest/doc_breakpoint-move.html
devtools/client/debugger/test/mochitest/doc_breakpoints-break-on-last-line-of-script-on-reload.html
devtools/client/debugger/test/mochitest/doc_breakpoints-other-tabs.html
devtools/client/debugger/test/mochitest/doc_breakpoints-reload.html
devtools/client/debugger/test/mochitest/doc_bug-896139.html
devtools/client/debugger/test/mochitest/doc_closure-optimized-out.html
devtools/client/debugger/test/mochitest/doc_closures.html
devtools/client/debugger/test/mochitest/doc_conditional-breakpoints.html
devtools/client/debugger/test/mochitest/doc_domnode-variables.html
devtools/client/debugger/test/mochitest/doc_editor-mode.html
devtools/client/debugger/test/mochitest/doc_empty-tab-01.html
devtools/client/debugger/test/mochitest/doc_empty-tab-02.html
devtools/client/debugger/test/mochitest/doc_event-listeners-02.html
devtools/client/debugger/test/mochitest/doc_frame-parameters.html
devtools/client/debugger/test/mochitest/doc_function-display-name.html
devtools/client/debugger/test/mochitest/doc_function-jump.html
devtools/client/debugger/test/mochitest/doc_function-search.html
devtools/client/debugger/test/mochitest/doc_iframes.html
devtools/client/debugger/test/mochitest/doc_included-script.html
devtools/client/debugger/test/mochitest/doc_inline-script.html
devtools/client/debugger/test/mochitest/doc_large-array-buffer.html
devtools/client/debugger/test/mochitest/doc_map-set.html
devtools/client/debugger/test/mochitest/doc_minified.html
devtools/client/debugger/test/mochitest/doc_minified_bogus_map.html
devtools/client/debugger/test/mochitest/doc_no-page-sources.html
devtools/client/debugger/test/mochitest/doc_pause-exceptions.html
devtools/client/debugger/test/mochitest/doc_promise.html
devtools/client/debugger/test/mochitest/doc_proxy.html
devtools/client/debugger/test/mochitest/doc_random-javascript.html
devtools/client/debugger/test/mochitest/doc_recursion-stack.html
devtools/client/debugger/test/mochitest/doc_scope-variable-2.html
devtools/client/debugger/test/mochitest/doc_scope-variable-3.html
devtools/client/debugger/test/mochitest/doc_scope-variable-4.html
devtools/client/debugger/test/mochitest/doc_scope-variable.html
devtools/client/debugger/test/mochitest/doc_script-bookmarklet.html
devtools/client/debugger/test/mochitest/doc_script-eval.html
devtools/client/debugger/test/mochitest/doc_script-switching-01.html
devtools/client/debugger/test/mochitest/doc_script-switching-02.html
devtools/client/debugger/test/mochitest/doc_script_webext_contentscript.html
devtools/client/debugger/test/mochitest/doc_split-console-paused-reload.html
devtools/client/debugger/test/mochitest/doc_step-many-statements.html
devtools/client/debugger/test/mochitest/doc_step-out.html
devtools/client/debugger/test/mochitest/doc_watch-expression-button.html
devtools/client/debugger/test/mochitest/doc_watch-expressions.html
devtools/client/debugger/test/mochitest/doc_whitespace-property-names.html
devtools/client/debugger/test/mochitest/doc_with-frame.html
devtools/client/debugger/test/mochitest/doc_worker-source-map.html
devtools/client/debugger/test/mochitest/head.js
devtools/client/debugger/test/mochitest/sjs_post-page.sjs
devtools/client/debugger/test/mochitest/sjs_random-javascript.sjs
devtools/client/debugger/test/mochitest/testactors.js
devtools/client/debugger/utils.js
devtools/client/debugger/views/filter-view.js
devtools/client/debugger/views/global-search-view.js
devtools/client/debugger/views/options-view.js
devtools/client/debugger/views/stack-frames-classic-view.js
devtools/client/debugger/views/stack-frames-view.js
devtools/client/debugger/views/toolbar-view.js
devtools/client/debugger/views/variable-bubble-view.js
devtools/client/debugger/views/watch-expressions-view.js
devtools/client/debugger/views/workers-view.js
devtools/client/definitions.js
devtools/client/framework/attach-thread.js
devtools/client/jar.mn
devtools/client/locales/en-US/debugger.dtd
devtools/client/preferences/debugger.js
devtools/client/sourceeditor/editor.js
devtools/client/themes/debugger.css
devtools/client/themes/images/debugger-toggleBreakpoints.svg
devtools/client/themes/images/tracer-icon.png
devtools/client/themes/images/tracer-icon@2x.png
devtools/client/themes/tooltip/arrow-horizontal-dark.png
devtools/client/themes/tooltip/arrow-horizontal-dark@2x.png
devtools/client/themes/tooltip/arrow-horizontal-light.png
devtools/client/themes/tooltip/arrow-horizontal-light@2x.png
devtools/client/themes/tooltip/arrow-vertical-dark.png
devtools/client/themes/tooltip/arrow-vertical-dark@2x.png
devtools/client/themes/tooltip/arrow-vertical-light.png
devtools/client/themes/tooltip/arrow-vertical-light@2x.png
deleted file mode 100644
--- a/devtools/client/debugger/content/actions/breakpoints.js
+++ /dev/null
@@ -1,191 +0,0 @@
-/* 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/. */
-"use strict";
-
-const constants = require("../constants");
-const promise = require("promise");
-const { asPaused } = require("../utils");
-const { PROMISE } = require("devtools/client/shared/redux/middleware/promise");
-const {
-  getSource, getBreakpoint, getBreakpoints, makeLocationId
-} = require("../queries");
-const { Task } = require("devtools/shared/task");
-
-// Because breakpoints are just simple data structures, we still need
-// a way to lookup the actual client instance to talk to the server.
-// We keep an internal database of clients based off of actor ID.
-const BREAKPOINT_CLIENT_STORE = new Map();
-
-function setBreakpointClient(actor, client) {
-  BREAKPOINT_CLIENT_STORE.set(actor, client);
-}
-
-function getBreakpointClient(actor) {
-  return BREAKPOINT_CLIENT_STORE.get(actor);
-}
-
-function enableBreakpoint(location) {
-  // Enabling is exactly the same as adding. It will use the existing
-  // breakpoint that still stored.
-  return addBreakpoint(location);
-}
-
-function _breakpointExists(state, location) {
-  const currentBp = getBreakpoint(state, location);
-  return currentBp && !currentBp.disabled;
-}
-
-function _getOrCreateBreakpoint(state, location, condition) {
-  return getBreakpoint(state, location) || { location, condition };
-}
-
-function addBreakpoint(location, condition) {
-  return (dispatch, getState) => {
-    if (_breakpointExists(getState(), location)) {
-      return;
-    }
-
-    const bp = _getOrCreateBreakpoint(getState(), location, condition);
-
-    return dispatch({
-      type: constants.ADD_BREAKPOINT,
-      breakpoint: bp,
-      condition: condition,
-      [PROMISE]: Task.spawn(function* () {
-        const sourceClient = gThreadClient.source(
-          getSource(getState(), bp.location.actor)
-        );
-        const [response, bpClient] = yield sourceClient.setBreakpoint({
-          line: bp.location.line,
-          column: bp.location.column,
-          condition: bp.condition
-        });
-        const { isPending, actualLocation } = response;
-
-        // Save the client instance
-        setBreakpointClient(bpClient.actor, bpClient);
-        let lineOrOffset = DebuggerView.editor.isWasm ? bp.location.line :
-          (actualLocation ? actualLocation.line : bp.location.line) - 1;
-        return {
-          text: DebuggerView.editor.getText(lineOrOffset).trim(),
-          isWasm: DebuggerView.editor.isWasm,
-
-          // If the breakpoint response has an "actualLocation" attached, then
-          // the original requested placement for the breakpoint wasn't
-          // accepted.
-          actualLocation: isPending ? null : actualLocation,
-          actor: bpClient.actor
-        };
-      })
-    });
-  };
-}
-
-function disableBreakpoint(location) {
-  return _removeOrDisableBreakpoint(location, true);
-}
-
-function removeBreakpoint(location) {
-  return _removeOrDisableBreakpoint(location);
-}
-
-function _removeOrDisableBreakpoint(location, isDisabled) {
-  return (dispatch, getState) => {
-    let bp = getBreakpoint(getState(), location);
-    if (!bp) {
-      throw new Error("attempt to remove breakpoint that does not exist");
-    }
-    if (bp.loading) {
-      // TODO(jwl): make this wait until the breakpoint is saved if it
-      // is still loading
-      throw new Error("attempt to remove unsaved breakpoint");
-    }
-
-    const bpClient = getBreakpointClient(bp.actor);
-    const action = {
-      type: constants.REMOVE_BREAKPOINT,
-      breakpoint: bp,
-      disabled: isDisabled
-    };
-
-    // If the breakpoint is already disabled, we don't need to remove
-    // it from the server. We just need to dispatch an action
-    // simulating a successful server request to remove it, and it
-    // will be removed completely from the state.
-    if (!bp.disabled) {
-      return dispatch(Object.assign({}, action, {
-        [PROMISE]: bpClient.remove()
-      }));
-    } else {
-      return dispatch(Object.assign({}, action, { status: "done" }));
-    }
-  };
-}
-
-function removeAllBreakpoints() {
-  return (dispatch, getState) => {
-    const breakpoints = getBreakpoints(getState());
-    const activeBreakpoints = breakpoints.filter(bp => !bp.disabled);
-    activeBreakpoints.forEach(bp => removeBreakpoint(bp.location));
-  };
-}
-
-/**
- * Update the condition of a breakpoint.
- *
- * @param object aLocation
- *        @see DebuggerController.Breakpoints.addBreakpoint
- * @param string aClients
- *        The condition to set on the breakpoint
- * @return object
- *         A promise that will be resolved with the breakpoint client
- */
-function setBreakpointCondition(location, condition) {
-  return (dispatch, getState) => {
-    const bp = getBreakpoint(getState(), location);
-    if (!bp) {
-      throw new Error("Breakpoint does not exist at the specified location");
-    }
-    if (bp.loading) {
-      // TODO(jwl): when this function is called, make sure the action
-      // creator waits for the breakpoint to exist
-      throw new Error("breakpoint must be saved");
-    }
-
-    const bpClient = getBreakpointClient(bp.actor);
-    const action = {
-      type: constants.SET_BREAKPOINT_CONDITION,
-      breakpoint: bp,
-      condition: condition
-    };
-
-    // If it's not disabled, we need to update the condition on the
-    // server. Otherwise, just dispatch a non-remote action that
-    // updates the condition locally.
-    if (!bp.disabled) {
-      return dispatch(Object.assign({}, action, {
-        [PROMISE]: Task.spawn(function* () {
-          const newClient = yield bpClient.setCondition(gThreadClient, condition);
-
-          // Remove the old instance and save the new one
-          setBreakpointClient(bpClient.actor, null);
-          setBreakpointClient(newClient.actor, newClient);
-
-          return { actor: newClient.actor };
-        })
-      }));
-    } else {
-      return dispatch(action);
-    }
-  };
-}
-
-module.exports = {
-  enableBreakpoint,
-  addBreakpoint,
-  disableBreakpoint,
-  removeBreakpoint,
-  removeAllBreakpoints,
-  setBreakpointCondition
-};
deleted file mode 100644
--- a/devtools/client/debugger/content/actions/event-listeners.js
+++ /dev/null
@@ -1,118 +0,0 @@
-/* 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/. */
-"use strict";
-
-const constants = require("../constants");
-const { asPaused } = require("../utils");
-const { reportException } = require("devtools/shared/DevToolsUtils");
-const { setNamedTimeout } = require("devtools/client/shared/widgets/view-helpers");
-const { Task } = require("devtools/shared/task");
-
-const FETCH_EVENT_LISTENERS_DELAY = 200; // ms
-
-function fetchEventListeners() {
-  return (dispatch, getState) => {
-    // Make sure we"re not sending a batch of closely repeated requests.
-    // This can easily happen whenever new sources are fetched.
-    setNamedTimeout("event-listeners-fetch", FETCH_EVENT_LISTENERS_DELAY, () => {
-      // In case there is still a request of listeners going on (it
-      // takes several RDP round trips right now), make sure we wait
-      // on a currently running request
-      if (getState().eventListeners.fetchingListeners) {
-        dispatch({
-          type: services.WAIT_UNTIL,
-          predicate: action => (
-            action.type === constants.FETCH_EVENT_LISTENERS &&
-            action.status === "done"
-          ),
-          run: dispatch => dispatch(fetchEventListeners())
-        });
-        return;
-      }
-
-      dispatch({
-        type: constants.FETCH_EVENT_LISTENERS,
-        status: "begin"
-      });
-
-      asPaused(gThreadClient, _getListeners).then(listeners => {
-        // Notify that event listeners were fetched and shown in the view,
-        // and callback to resume the active thread if necessary.
-        window.emit(EVENTS.EVENT_LISTENERS_FETCHED);
-
-        dispatch({
-          type: constants.FETCH_EVENT_LISTENERS,
-          status: "done",
-          listeners: listeners
-        });
-      });
-    });
-  };
-}
-
-const _getListeners = Task.async(function* () {
-  const response = yield gThreadClient.eventListeners();
-
-  // Make sure all the listeners are sorted by the event type, since
-  // they"re not guaranteed to be clustered together.
-  response.listeners.sort((a, b) => a.type > b.type ? 1 : -1);
-
-  // Add all the listeners in the debugger view event linsteners container.
-  let fetchedDefinitions = new Map();
-  let listeners = [];
-  for (let listener of response.listeners) {
-    let definitionSite;
-    if (fetchedDefinitions.has(listener.function.actor)) {
-      definitionSite = fetchedDefinitions.get(listener.function.actor);
-    } else if (listener.function.class == "Function") {
-      definitionSite = yield _getDefinitionSite(listener.function);
-      if (!definitionSite) {
-        // We don"t know where this listener comes from so don"t show it in
-        // the UI as breaking on it doesn"t work (bug 942899).
-        continue;
-      }
-
-      fetchedDefinitions.set(listener.function.actor, definitionSite);
-    }
-    listener.function.url = definitionSite;
-    listeners.push(listener);
-  }
-  fetchedDefinitions.clear();
-
-  return listeners;
-});
-
-const _getDefinitionSite = Task.async(function* (aFunction) {
-  const grip = gThreadClient.pauseGrip(aFunction);
-  let response;
-
-  try {
-    response = yield grip.getDefinitionSite();
-  }
-  catch (e) {
-    // Don't make this error fatal, because it would break the entire events pane.
-    reportException("_getDefinitionSite", e);
-    return null;
-  }
-
-  return response.source.url;
-});
-
-function updateEventBreakpoints(eventNames) {
-  return dispatch => {
-    setNamedTimeout("event-breakpoints-update", 0, () => {
-      gThreadClient.pauseOnDOMEvents(eventNames, function () {
-        // Notify that event breakpoints were added/removed on the server.
-        window.emit(EVENTS.EVENT_BREAKPOINTS_UPDATED);
-
-        dispatch({
-          type: constants.UPDATE_EVENT_BREAKPOINTS,
-          eventNames: eventNames
-        });
-      });
-    });
-  };
-}
-
-module.exports = { updateEventBreakpoints, fetchEventListeners };
deleted file mode 100644
--- a/devtools/client/debugger/content/actions/moz.build
+++ /dev/null
@@ -1,10 +0,0 @@
-# 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/.
-
-DevToolsModules(
-    'breakpoints.js',
-    'event-listeners.js',
-    'sources.js'
-)
deleted file mode 100644
--- a/devtools/client/debugger/content/actions/sources.js
+++ /dev/null
@@ -1,283 +0,0 @@
-/* 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/. */
-"use strict";
-
-const constants = require("../constants");
-const promise = require("promise");
-const Services = require("Services");
-const { dumpn } = require("devtools/shared/DevToolsUtils");
-const { PROMISE, HISTOGRAM_ID } = require("devtools/client/shared/redux/middleware/promise");
-const { getSource, getSourceText } = require("../queries");
-const { Task } = require("devtools/shared/task");
-const Telemetry = require("devtools/client/shared/telemetry");
-
-const NEW_SOURCE_IGNORED_URLS = ["debugger eval code", "XStringBundle"];
-const FETCH_SOURCE_RESPONSE_DELAY = 200; // ms
-
-const telemetry = new Telemetry();
-
-function getSourceClient(source) {
-  return gThreadClient.source(source);
-}
-
-/**
- * Handler for the debugger client's unsolicited newSource notification.
- */
-function newSource(source) {
-  return dispatch => {
-    // Ignore bogus scripts, e.g. generated from 'clientEvaluate' packets.
-    if (NEW_SOURCE_IGNORED_URLS.includes(source.url)) {
-      return;
-    }
-
-    // Signal that a new source has been added.
-    window.emit(EVENTS.NEW_SOURCE);
-
-    return dispatch({
-      type: constants.ADD_SOURCE,
-      source: source
-    });
-  };
-}
-
-function selectSource(source, opts) {
-  return (dispatch, getState) => {
-    if (!gThreadClient) {
-      // No connection, do nothing. This happens when the debugger is
-      // shut down too fast and it tries to display a default source.
-      return;
-    }
-
-    source = getSource(getState(), source.actor);
-
-    // Make sure to start a request to load the source text.
-    dispatch(loadSourceText(source));
-
-    dispatch({
-      type: constants.SELECT_SOURCE,
-      source: source,
-      opts: opts
-    });
-  };
-}
-
-function loadSources() {
-  return {
-    type: constants.LOAD_SOURCES,
-    [PROMISE]: Task.spawn(function* () {
-      const response = yield gThreadClient.getSources();
-
-      // Top-level breakpoints may pause the entire loading process
-      // because scripts are executed as they are loaded, so the
-      // engine may pause in the middle of loading all the sources.
-      // This is relatively harmless, as individual `newSource`
-      // notifications are fired for each script and they will be
-      // added to the UI through that.
-      if (!response.sources) {
-        dumpn(
-          "Error getting sources, probably because a top-level " +
-          "breakpoint was hit while executing them"
-        );
-        return;
-      }
-
-      // Ignore bogus scripts, e.g. generated from 'clientEvaluate' packets.
-      return response.sources.filter(source => {
-        return !NEW_SOURCE_IGNORED_URLS.includes(source.url);
-      });
-    })
-  };
-}
-
-/**
- * Set the black boxed status of the given source.
- *
- * @param Object aSource
- *        The source form.
- * @param bool aBlackBoxFlag
- *        True to black box the source, false to un-black box it.
- * @returns Promise
- *          A promize that resolves to [aSource, isBlackBoxed] or rejects to
- *          [aSource, error].
- */
-function blackbox(source, shouldBlackBox) {
-  const client = getSourceClient(source);
-
-  return {
-    type: constants.BLACKBOX,
-    source: source,
-    [PROMISE]: Task.spawn(function* () {
-      yield shouldBlackBox ? client.blackBox() : client.unblackBox();
-      return {
-        isBlackBoxed: shouldBlackBox
-      };
-    })
-  };
-}
-
-/**
- * Toggle the pretty printing of a source's text. All subsequent calls to
- * |getText| will return the pretty-toggled text. Nothing will happen for
- * non-javascript files.
- *
- * @param Object aSource
- *        The source form from the RDP.
- * @returns Promise
- *          A promise that resolves to [aSource, prettyText] or rejects to
- *          [aSource, error].
- */
-function togglePrettyPrint(source) {
-  return (dispatch, getState) => {
-    const sourceClient = getSourceClient(source);
-    const wantPretty = !source.isPrettyPrinted;
-
-    return dispatch({
-      type: constants.TOGGLE_PRETTY_PRINT,
-      source: source,
-      [PROMISE]: Task.spawn(function* () {
-        let response;
-
-        // Only attempt to pretty print JavaScript sources.
-        const sourceText = getSourceText(getState(), source.actor);
-        const contentType = sourceText ? sourceText.contentType : null;
-        if (!SourceUtils.isJavaScript(source.url, contentType)) {
-          throw new Error("Can't prettify non-javascript files.");
-        }
-
-        if (wantPretty) {
-          response = yield sourceClient.prettyPrint(Prefs.editorTabSize);
-        }
-        else {
-          response = yield sourceClient.disablePrettyPrint();
-        }
-
-        // Remove the cached source AST from the Parser, to avoid getting
-        // wrong locations when searching for functions.
-        DebuggerController.Parser.clearSource(source.url);
-
-        return {
-          isPrettyPrinted: wantPretty,
-          text: response.source,
-          contentType: response.contentType
-        };
-      })
-    });
-  };
-}
-
-function loadSourceText(source) {
-  return (dispatch, getState) => {
-    // Fetch the source text only once.
-    let textInfo = getSourceText(getState(), source.actor);
-    if (textInfo) {
-      // It's already loaded or is loading
-      return promise.resolve(textInfo);
-    }
-
-    const sourceClient = getSourceClient(source);
-
-    return dispatch({
-      type: constants.LOAD_SOURCE_TEXT,
-      source: source,
-      [PROMISE]: Task.spawn(function* () {
-        let transportType = gClient.localTransport ? "_LOCAL" : "_REMOTE";
-        let histogramId = "DEVTOOLS_DEBUGGER_DISPLAY_SOURCE" + transportType + "_MS";
-
-        telemetry.start(histogramId, this);
-
-        const response = yield sourceClient.source();
-
-        telemetry.finish(histogramId, this);
-
-        // Automatically pretty print if enabled and the test is
-        // detected to be "minified"
-        if (Prefs.autoPrettyPrint &&
-            !source.isPrettyPrinted &&
-            SourceUtils.isMinified(source.actor, response.source)) {
-          dispatch(togglePrettyPrint(source));
-        }
-
-        return { text: response.source,
-                 contentType: response.contentType };
-      })
-    });
-  };
-}
-
-/**
- * Starts fetching all the sources, silently.
- *
- * @param array aUrls
- *        The urls for the sources to fetch. If fetching a source's text
- *        takes too long, it will be discarded.
- * @return object
- *         A promise that is resolved after source texts have been fetched.
- */
-function getTextForSources(actors) {
-  return (dispatch, getState) => {
-    let deferred = promise.defer();
-    let pending = new Set(actors);
-    let fetched = [];
-
-    // Can't use promise.all, because if one fetch operation is rejected, then
-    // everything is considered rejected, thus no other subsequent source will
-    // be getting fetched. We don't want that. Something like Q's allSettled
-    // would work like a charm here.
-
-    // Try to fetch as many sources as possible.
-    for (let actor of actors) {
-      let source = getSource(getState(), actor);
-      dispatch(loadSourceText(source)).then(({ text, contentType }) => {
-        onFetch([source, text, contentType]);
-      }, err => {
-        onError(source, err);
-      });
-    }
-
-    setTimeout(onTimeout, FETCH_SOURCE_RESPONSE_DELAY);
-
-    /* Called if fetching a source takes too long. */
-    function onTimeout() {
-      pending = new Set();
-      maybeFinish();
-    }
-
-    /* Called if fetching a source finishes successfully. */
-    function onFetch([aSource, aText, aContentType]) {
-      // If fetching the source has previously timed out, discard it this time.
-      if (!pending.has(aSource.actor)) {
-        return;
-      }
-      pending.delete(aSource.actor);
-      fetched.push([aSource.actor, aText, aContentType]);
-      maybeFinish();
-    }
-
-    /* Called if fetching a source failed because of an error. */
-    function onError([aSource, aError]) {
-      pending.delete(aSource.actor);
-      maybeFinish();
-    }
-
-    /* Called every time something interesting happens while fetching sources. */
-    function maybeFinish() {
-      if (pending.size == 0) {
-        // Sort the fetched sources alphabetically by their url.
-        deferred.resolve(fetched.sort(([aFirst], [aSecond]) => aFirst > aSecond));
-      }
-    }
-
-    return deferred.promise;
-  };
-}
-
-module.exports = {
-  newSource,
-  selectSource,
-  loadSources,
-  blackbox,
-  togglePrettyPrint,
-  loadSourceText,
-  getTextForSources
-};
deleted file mode 100644
--- a/devtools/client/debugger/content/constants.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* 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/. */
-"use strict";
-
-exports.UPDATE_EVENT_BREAKPOINTS = "UPDATE_EVENT_BREAKPOINTS";
-exports.FETCH_EVENT_LISTENERS = "FETCH_EVENT_LISTENERS";
-
-exports.TOGGLE_PRETTY_PRINT = "TOGGLE_PRETTY_PRINT";
-exports.BLACKBOX = "BLACKBOX";
-
-exports.ADD_BREAKPOINT = "ADD_BREAKPOINT";
-exports.REMOVE_BREAKPOINT = "REMOVE_BREAKPOINT";
-exports.ENABLE_BREAKPOINT = "ENABLE_BREAKPOINT";
-exports.DISABLE_BREAKPOINT = "DISABLE_BREAKPOINT";
-exports.SET_BREAKPOINT_CONDITION = "SET_BREAKPOINT_CONDITION";
-
-exports.ADD_SOURCE = "ADD_SOURCE";
-exports.LOAD_SOURCES = "LOAD_SOURCES";
-exports.LOAD_SOURCE_TEXT = "LOAD_SOURCE_TEXT";
-exports.SELECT_SOURCE = "SELECT_SOURCE";
-exports.UNLOAD = "UNLOAD";
-exports.RELOAD = "RELOAD";
deleted file mode 100644
--- a/devtools/client/debugger/content/globalActions.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* 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/. */
-"use strict";
-
-const constants = require("./constants");
-
-// Fired when the page is being unloaded, for example when it's being
-// navigated away from.
-function unload() {
-  return {
-    type: constants.UNLOAD
-  };
-}
-
-module.exports = { unload };
deleted file mode 100644
--- a/devtools/client/debugger/content/moz.build
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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/.
-
-DIRS += [
-    'actions',
-    'reducers',
-    'tooltip',
-    'views',
-]
-
-DevToolsModules(
-    'constants.js',
-    'globalActions.js',
-    'queries.js',
-    'utils.js'
-)
deleted file mode 100644
--- a/devtools/client/debugger/content/queries.js
+++ /dev/null
@@ -1,70 +0,0 @@
-
-function getSource(state, actor) {
-  return state.sources.sources[actor];
-}
-
-function getSources(state) {
-  return state.sources.sources;
-}
-
-function getSourceCount(state) {
-  return Object.keys(state.sources.sources).length;
-}
-
-function getSourceByURL(state, url) {
-  for (let k in state.sources.sources) {
-    const source = state.sources.sources[k];
-    if (source.url === url) {
-      return source;
-    }
-  }
-}
-
-function getSourceByActor(state, actor) {
-  for (let k in state.sources.sources) {
-    const source = state.sources.sources[k];
-    if (source.actor === actor) {
-      return source;
-    }
-  }
-}
-
-function getSelectedSource(state) {
-  return state.sources.sources[state.sources.selectedSource];
-}
-
-function getSelectedSourceOpts(state) {
-  return state.sources.selectedSourceOpts;
-}
-
-function getSourceText(state, actor) {
-  return state.sources.sourcesText[actor];
-}
-
-function getBreakpoints(state) {
-  return Object.keys(state.breakpoints.breakpoints).map(k => {
-    return state.breakpoints.breakpoints[k];
-  });
-}
-
-function getBreakpoint(state, location) {
-  return state.breakpoints.breakpoints[makeLocationId(location)];
-}
-
-function makeLocationId(location) {
-  return location.actor + ":" + location.line.toString();
-}
-
-module.exports = {
-  getSource,
-  getSources,
-  getSourceCount,
-  getSourceByURL,
-  getSourceByActor,
-  getSelectedSource,
-  getSelectedSourceOpts,
-  getSourceText,
-  getBreakpoint,
-  getBreakpoints,
-  makeLocationId
-};
deleted file mode 100644
--- a/devtools/client/debugger/content/reducers/async-requests.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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/. */
-"use strict";
-
-const constants = require("../constants");
-const initialState = [];
-
-function update(state = initialState, action, emitChange) {
-  const { seqId } = action;
-
-  if (action.type === constants.UNLOAD) {
-    return initialState;
-  }
-  else if (seqId) {
-    let newState;
-    if (action.status === "start") {
-      newState = [...state, seqId];
-    }
-    else if (action.status === "error" || action.status === "done") {
-      newState = state.filter(id => id !== seqId);
-    }
-
-    emitChange("open-requests", newState);
-    return newState;
-  }
-
-  return state;
-}
-
-module.exports = update;
deleted file mode 100644
--- a/devtools/client/debugger/content/reducers/breakpoints.js
+++ /dev/null
@@ -1,154 +0,0 @@
-/* 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/. */
-"use strict";
-
-const constants = require("../constants");
-const Immutable = require("devtools/client/shared/vendor/seamless-immutable");
-const { mergeIn, setIn, deleteIn } = require("../utils");
-const { makeLocationId } = require("../queries");
-
-const initialState = Immutable({
-  breakpoints: {}
-});
-
-// Return the first argument that is a string, or null if nothing is a
-// string.
-function firstString(...args) {
-  for (var arg of args) {
-    if (typeof arg === "string") {
-      return arg;
-    }
-  }
-  return null;
-}
-
-function update(state = initialState, action, emitChange) {
-  switch (action.type) {
-    case constants.ADD_BREAKPOINT: {
-      const id = makeLocationId(action.breakpoint.location);
-
-      if (action.status === "start") {
-        const existingBp = state.breakpoints[id];
-        const bp = existingBp || Immutable(action.breakpoint);
-
-        state = setIn(state, ["breakpoints", id], bp.merge({
-          disabled: false,
-          loading: true,
-        // We want to do an OR here, but we can't because we need
-        // empty strings to be truthy, i.e. an empty string is a valid
-        // condition.
-          condition: firstString(action.condition, bp.condition)
-        }));
-
-        emitChange(existingBp ? "breakpoint-enabled" : "breakpoint-added",
-                 state.breakpoints[id]);
-        return state;
-      }
-      else if (action.status === "done") {
-        const { actor, text, isWasm } = action.value;
-        let { actualLocation } = action.value;
-
-      // If the breakpoint moved, update the map
-        if (actualLocation) {
-        // XXX Bug 1227417: The `setBreakpoint` RDP request rdp
-        // request returns an `actualLocation` field that doesn't
-        // conform to the regular { actor, line } location shape, but
-        // it has a `source` field. We should fix that.
-          actualLocation = { actor: actualLocation.source.actor,
-                           line: actualLocation.line };
-
-          state = deleteIn(state, ["breakpoints", id]);
-
-          const movedId = makeLocationId(actualLocation);
-          const currentBp = state.breakpoints[movedId] || Immutable(action.breakpoint);
-          const prevLocation = action.breakpoint.location;
-          const newBp = currentBp.merge({ location: actualLocation });
-          state = setIn(state, ["breakpoints", movedId], newBp);
-
-          emitChange("breakpoint-moved", {
-            breakpoint: newBp,
-            prevLocation: prevLocation
-          });
-        }
-
-        const finalLocation = (
-        actualLocation ? actualLocation : action.breakpoint.location
-      );
-        const finalLocationId = makeLocationId(finalLocation);
-        state = mergeIn(state, ["breakpoints", finalLocationId], {
-          disabled: false,
-          loading: false,
-          actor: actor,
-          isWasm: isWasm,
-          text: text
-        });
-        emitChange("breakpoint-updated", state.breakpoints[finalLocationId]);
-        return state;
-      }
-    else if (action.status === "error") {
-      // Remove the optimistic update
-      emitChange("breakpoint-removed", state.breakpoints[id]);
-      return deleteIn(state, ["breakpoints", id]);
-    }
-      break;
-    }
-
-    case constants.REMOVE_BREAKPOINT: {
-      if (action.status === "done") {
-        const id = makeLocationId(action.breakpoint.location);
-        const bp = state.breakpoints[id];
-
-        if (action.disabled) {
-          state = mergeIn(state, ["breakpoints", id],
-                        { loading: false, disabled: true });
-          emitChange("breakpoint-disabled", state.breakpoints[id]);
-          return state;
-        }
-
-        state = deleteIn(state, ["breakpoints", id]);
-        emitChange("breakpoint-removed", bp);
-        return state;
-      }
-      break;
-    }
-
-    case constants.SET_BREAKPOINT_CONDITION: {
-      const id = makeLocationId(action.breakpoint.location);
-      const bp = state.breakpoints[id];
-      emitChange("breakpoint-condition-updated", bp);
-
-      if (!action.status) {
-      // No status means that it wasn't a remote request. Just update
-      // the condition locally.
-        return mergeIn(state, ["breakpoints", id], {
-          condition: action.condition
-        });
-      }
-      else if (action.status === "start") {
-        return mergeIn(state, ["breakpoints", id], {
-          loading: true,
-          condition: action.condition
-        });
-      }
-    else if (action.status === "done") {
-      return mergeIn(state, ["breakpoints", id], {
-        loading: false,
-        condition: action.condition,
-        // Setting a condition creates a new breakpoint client as of
-        // now, so we need to update the actor
-        actor: action.value.actor
-      });
-    }
-    else if (action.status === "error") {
-      emitChange("breakpoint-removed", bp);
-      return deleteIn(state, ["breakpoints", id]);
-    }
-
-      break;
-    }}
-
-  return state;
-}
-
-module.exports = update;
deleted file mode 100644
--- a/devtools/client/debugger/content/reducers/event-listeners.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* 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/. */
-"use strict";
-
-const constants = require("../constants");
-
-const FETCH_EVENT_LISTENERS_DELAY = 200; // ms
-
-const initialState = {
-  activeEventNames: [],
-  listeners: [],
-  fetchingListeners: false,
-};
-
-function update(state = initialState, action, emit) {
-  switch (action.type) {
-    case constants.UPDATE_EVENT_BREAKPOINTS:
-      state.activeEventNames = action.eventNames;
-      emit("activeEventNames", state.activeEventNames);
-      break;
-    case constants.FETCH_EVENT_LISTENERS:
-      if (action.status === "begin") {
-        state.fetchingListeners = true;
-      }
-      else if (action.status === "done") {
-        state.fetchingListeners = false;
-        state.listeners = action.listeners;
-        emit("event-listeners", state.listeners);
-      }
-      break;
-  }
-
-  return state;
-}
-
-module.exports = update;
deleted file mode 100644
--- a/devtools/client/debugger/content/reducers/index.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/* 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/. */
-"use strict";
-
-const eventListeners = require("./event-listeners");
-const sources = require("./sources");
-const breakpoints = require("./breakpoints");
-const asyncRequests = require("./async-requests");
-
-module.exports = {
-  eventListeners,
-  sources,
-  breakpoints,
-  asyncRequests
-};
deleted file mode 100644
--- a/devtools/client/debugger/content/reducers/moz.build
+++ /dev/null
@@ -1,12 +0,0 @@
-# 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/.
-
-DevToolsModules(
-    'async-requests.js',
-    'breakpoints.js',
-    'event-listeners.js',
-    'index.js',
-    'sources.js'
-)
deleted file mode 100644
--- a/devtools/client/debugger/content/reducers/sources.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/* 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/. */
-"use strict";
-
-const constants = require("../constants");
-const Immutable = require("devtools/client/shared/vendor/seamless-immutable");
-const { mergeIn, setIn } = require("../utils");
-
-const initialState = Immutable({
-  sources: {},
-  selectedSource: null,
-  selectedSourceOpts: null,
-  sourcesText: {}
-});
-
-function update(state = initialState, action, emitChange) {
-  switch (action.type) {
-    case constants.ADD_SOURCE:
-      emitChange("source", action.source);
-      return mergeIn(state, ["sources", action.source.actor], action.source);
-
-    case constants.LOAD_SOURCES:
-      if (action.status === "done") {
-        const sources = action.value;
-        if (!sources) {
-          return state;
-        }
-        const sourcesByActor = {};
-        sources.forEach(source => {
-          if (!state.sources[source.actor]) {
-            emitChange("source", source);
-          }
-          sourcesByActor[source.actor] = source;
-        });
-        return mergeIn(state, ["sources"], state.sources.merge(sourcesByActor));
-      }
-      break;
-
-    case constants.SELECT_SOURCE:
-      emitChange("source-selected", action.source);
-      return state.merge({
-        selectedSource: action.source.actor,
-        selectedSourceOpts: action.opts
-      });
-
-    case constants.LOAD_SOURCE_TEXT: {
-      const s = _updateText(state, action);
-      emitChange("source-text-loaded", s.sources[action.source.actor]);
-      return s;
-    }
-
-    case constants.BLACKBOX:
-      if (action.status === "done") {
-        const s = mergeIn(state,
-                        ["sources", action.source.actor, "isBlackBoxed"],
-                        action.value.isBlackBoxed);
-        emitChange("blackboxed", s.sources[action.source.actor]);
-        return s;
-      }
-      break;
-
-    case constants.TOGGLE_PRETTY_PRINT:
-      let s = state;
-      if (action.status === "error") {
-        s = mergeIn(state, ["sourcesText", action.source.actor], {
-          loading: false
-        });
-
-      // If it errored, just display the source as it was before, but
-      // only if there is existing text already. If auto-prettifying
-      // is on, the original text may still be coming in and we don't
-      // have it yet. If we try to set empty text we confuse the
-      // editor because it thinks it's already displaying the source's
-      // text and won't load the text when it actually comes in.
-        if (s.sourcesText[action.source.actor].text != null) {
-          emitChange("prettyprinted", s.sources[action.source.actor]);
-        }
-      }
-      else {
-        s = _updateText(state, action);
-      // Don't do this yet, the progress bar is still imperatively shown
-      // from the source view. We will fix in the next iteration.
-      // emitChange('source-text-loaded', s.sources[action.source.actor]);
-
-        if (action.status === "done") {
-          s = mergeIn(s,
-                    ["sources", action.source.actor, "isPrettyPrinted"],
-                    action.value.isPrettyPrinted);
-          emitChange("prettyprinted", s.sources[action.source.actor]);
-        }
-      }
-      return s;
-
-    case constants.UNLOAD:
-    // Reset the entire state to just the initial state, a blank state
-    // if you will.
-      return initialState;
-  }
-
-  return state;
-}
-
-function _updateText(state, action) {
-  const { source } = action;
-
-  if (action.status === "start") {
-    // Merge this in, don't set it. That way the previous value is
-    // still stored here, and we can retrieve it if whatever we're
-    // doing fails.
-    return mergeIn(state, ["sourcesText", source.actor], {
-      loading: true
-    });
-  }
-  else if (action.status === "error") {
-    return setIn(state, ["sourcesText", source.actor], {
-      error: action.error
-    });
-  }
-  else {
-    return setIn(state, ["sourcesText", source.actor], {
-      text: action.value.text,
-      contentType: action.value.contentType
-    });
-  }
-}
-
-module.exports = update;
deleted file mode 100644
--- a/devtools/client/debugger/content/tooltip/Tooltip.js
+++ /dev/null
@@ -1,411 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const defer = require("devtools/shared/defer");
-const EventEmitter = require("devtools/shared/event-emitter");
-const {KeyCodes} = require("devtools/client/shared/keycodes");
-const {TooltipToggle} = require("devtools/client/shared/widgets/tooltip/TooltipToggle");
-
-const XHTML_NS = "http://www.w3.org/1999/xhtml";
-const ESCAPE_KEYCODE = KeyCodes.DOM_VK_ESCAPE;
-const POPUP_EVENTS = ["shown", "hidden", "showing", "hiding"];
-
-/**
- * Tooltip widget.
- *
- * This widget is intended at any tool that may need to show rich content in the
- * form of floating panels.
- * A common use case is image previewing in the CSS rule view, but more complex
- * use cases may include color pickers, object inspection, etc...
- *
- * Tooltips are based on XUL (namely XUL arrow-type <panel>s), and therefore
- * need a XUL Document to live in.
- * This is pretty much the only requirement they have on their environment.
- *
- * The way to use a tooltip is simply by instantiating a tooltip yourself and
- * attaching some content in it, or using one of the ready-made content types.
- *
- * A convenient `startTogglingOnHover` method may avoid having to register event
- * handlers yourself if the tooltip has to be shown when hovering over a
- * specific element or group of elements (which is usually the most common case)
- */
-
-/**
- * Tooltip class.
- *
- * Basic usage:
- *   let t = new Tooltip(xulDoc);
- *   t.content = someXulContent;
- *   t.show();
- *   t.hide();
- *   t.destroy();
- *
- * Better usage:
- *   let t = new Tooltip(xulDoc);
- *   t.startTogglingOnHover(container, target => {
- *     if (<condition based on target>) {
- *       t.content = el;
- *       return true;
- *     }
- *   });
- *   t.destroy();
- *
- * @param {XULDocument} doc
- *        The XUL document hosting this tooltip
- * @param {Object} options
- *        Optional options that give options to consumers:
- *        - consumeOutsideClick {Boolean} Wether the first click outside of the
- *        tooltip should close the tooltip and be consumed or not.
- *        Defaults to false.
- *        - closeOnKeys {Array} An array of key codes that should close the
- *        tooltip. Defaults to [27] (escape key).
- *        - closeOnEvents [{emitter: {Object}, event: {String},
- *                          useCapture: {Boolean}}]
- *        Provide an optional list of emitter objects and event names here to
- *        trigger the closing of the tooltip when these events are fired by the
- *        emitters. The emitter objects should either implement
- *        on/off(event, cb) or addEventListener/removeEventListener(event, cb).
- *        Defaults to [].
- *        For instance, the following would close the tooltip whenever the
- *        toolbox selects a new tool and when a DOM node gets scrolled:
- *        new Tooltip(doc, {
- *          closeOnEvents: [
- *            {emitter: toolbox, event: "select"},
- *            {emitter: myContainer, event: "scroll", useCapture: true}
- *          ]
- *        });
- *        - noAutoFocus {Boolean} Should the focus automatically go to the panel
- *        when it opens. Defaults to true.
- *
- * Fires these events:
- * - showing : just before the tooltip shows
- * - shown : when the tooltip is shown
- * - hiding : just before the tooltip closes
- * - hidden : when the tooltip gets hidden
- * - keydown : when any key gets pressed, with keyCode
- */
-
-class Tooltip {
-  constructor(doc, {
-  consumeOutsideClick = false,
-  closeOnKeys = [ESCAPE_KEYCODE],
-  noAutoFocus = true,
-  closeOnEvents = [],
-  } = {}) {
-    EventEmitter.decorate(this);
-
-    this.defaultPosition = "before_start";
-    // px
-    this.defaultOffsetX = 0;
-    // px
-    this.defaultOffsetY = 0;
-    // px
-
-    this.doc = doc;
-    this.consumeOutsideClick = consumeOutsideClick;
-    this.closeOnKeys = closeOnKeys;
-    this.noAutoFocus = noAutoFocus;
-    this.closeOnEvents = closeOnEvents;
-
-    this.panel = this._createPanel();
-
-    // Create tooltip toggle helper and decorate the Tooltip instance with
-    // shortcut methods.
-    this._toggle = new TooltipToggle(this);
-    this.startTogglingOnHover = this._toggle.start.bind(this._toggle);
-    this.stopTogglingOnHover = this._toggle.stop.bind(this._toggle);
-
-  // Emit show/hide events when the panel does.
-    for (const eventName of POPUP_EVENTS) {
-      this["_onPopup" + eventName] = (name => {
-        return e => {
-          if (e.target === this.panel) {
-            this.emit(name);
-          }
-        };
-      })(eventName);
-      this.panel.addEventListener("popup" + eventName,
-        this["_onPopup" + eventName]);
-    }
-
-  // Listen to keydown events to close the tooltip if configured to do so
-    const win = this.doc.querySelector("window");
-    this._onKeyDown = event => {
-      if (this.panel.hidden) {
-        return;
-      }
-
-      this.emit("keydown", event.keyCode);
-      if (this.closeOnKeys.includes(event.keyCode) &&
-          this.isShown()) {
-        event.stopPropagation();
-        this.hide();
-      }
-    };
-    win.addEventListener("keydown", this._onKeyDown);
-
-  // Listen to custom emitters' events to close the tooltip
-    this.hide = this.hide.bind(this);
-    for (const {emitter, event, useCapture} of this.closeOnEvents) {
-      for (const add of ["addEventListener", "on"]) {
-        if (add in emitter) {
-          emitter[add](event, this.hide, useCapture);
-          break;
-        }
-      }
-    }
-  }
-
-  /**
-   * Show the tooltip. It might be wise to append some content first if you
-   * don't want the tooltip to be empty. You may access the content of the
-   * tooltip by setting a XUL node to t.content.
-   * @param {node} anchor
-   *        Which node should the tooltip be shown on
-   * @param {string} position [optional]
-   *        Optional tooltip position. Defaults to before_start
-   *        https://developer.mozilla.org/en-US/docs/XUL/PopupGuide/Positioning
-   * @param {number} x, y [optional]
-   *        The left and top offset coordinates, in pixels.
-   */
-  show(anchor,
-    position = this.defaultPosition,
-    x = this.defaultOffsetX,
-    y = this.defaultOffsetY) {
-    this.panel.hidden = false;
-    this.panel.openPopup(anchor, position, x, y);
-  }
-
-  /**
-   * Hide the tooltip
-   */
-  hide() {
-    this.panel.hidden = true;
-    this.panel.hidePopup();
-  }
-
-  isShown() {
-    return this.panel &&
-           this.panel.state !== "closed" &&
-           this.panel.state !== "hiding";
-  }
-
-  setSize(width, height) {
-    this.panel.sizeTo(width, height);
-  }
-
-  /**
-   * Empty the tooltip's content
-   */
-  empty() {
-    while (this.panel.hasChildNodes()) {
-      this.panel.firstChild.remove();
-    }
-  }
-
-  /**
-   * Gets this panel's visibility state.
-   * @return boolean
-   */
-  isHidden() {
-    return this.panel.state == "closed" || this.panel.state == "hiding";
-  }
-
-  /**
-   * Gets if this panel has any child nodes.
-   * @return boolean
-   */
-  isEmpty() {
-    return !this.panel.hasChildNodes();
-  }
-
-  /**
-   * Get rid of references and event listeners
-   */
-  destroy() {
-    this.hide();
-
-    for (const eventName of POPUP_EVENTS) {
-      this.panel.removeEventListener("popup" + eventName,
-        this["_onPopup" + eventName]);
-    }
-
-    const win = this.doc.querySelector("window");
-    win.removeEventListener("keydown", this._onKeyDown);
-
-    for (const {emitter, event, useCapture} of this.closeOnEvents) {
-      for (const remove of ["removeEventListener", "off"]) {
-        if (remove in emitter) {
-          emitter[remove](event, this.hide, useCapture);
-          break;
-        }
-      }
-    }
-
-    this.content = null;
-
-    this._toggle.destroy();
-
-    this.doc = null;
-
-    this.panel.remove();
-    this.panel = null;
-  }
-
-  /**
-   * Returns the outer container node (that includes the arrow etc.). Happens
-   * to be identical to this.panel here, can be different element in other
-   * Tooltip implementations.
-   */
-  get container() {
-    return this.panel;
-  }
-
-  /**
-   * Set the content of this tooltip. Will first empty the tooltip and then
-   * append the new content element.
-   * Consider using one of the set<type>Content() functions instead.
-   * @param {node} content
-   *        A node that can be appended in the tooltip XUL element
-   */
-  set content(content) {
-    if (this.content == content) {
-      return;
-    }
-
-    this.empty();
-    this.panel.removeAttribute("clamped-dimensions");
-    this.panel.removeAttribute("clamped-dimensions-no-min-height");
-    this.panel.removeAttribute("clamped-dimensions-no-max-or-min-height");
-    this.panel.removeAttribute("wide");
-
-    if (content) {
-      this.panel.appendChild(content);
-    }
-  }
-
-  get content() {
-    return this.panel.firstChild;
-  }
-
-  /**
-   * Sets some text as the content of this tooltip.
-   *
-   * @param {array} messages
-   *        A list of text messages.
-   * @param {string} messagesClass [optional]
-   *        A style class for the text messages.
-   * @param {string} containerClass [optional]
-   *        A style class for the text messages container.
-   */
-  setTextContent(
-    {
-      messages,
-      messagesClass,
-      containerClass
-    },
-    extraButtons = []) {
-    messagesClass = messagesClass || "default-tooltip-simple-text-colors";
-    containerClass = containerClass || "default-tooltip-simple-text-colors";
-
-    const vbox = this.doc.createXULElement("vbox");
-    vbox.className = "devtools-tooltip-simple-text-container " + containerClass;
-    vbox.setAttribute("flex", "1");
-
-    for (const text of messages) {
-      const description = this.doc.createXULElement("description");
-      description.setAttribute("flex", "1");
-      description.className = "devtools-tooltip-simple-text " + messagesClass;
-      description.textContent = text;
-      vbox.appendChild(description);
-    }
-
-    for (const { label, className, command } of extraButtons) {
-      const button = this.doc.createXULElement("button");
-      button.className = className;
-      button.setAttribute("label", label);
-      button.addEventListener("command", command);
-      vbox.appendChild(button);
-    }
-
-    this.content = vbox;
-  }
-
-  /**
-   * Load a document into an iframe, and set the iframe
-   * to be the tooltip's content.
-   *
-   * Used by tooltips that want to load their interface
-   * into an iframe from a URL.
-   *
-   * @param {string} width
-   *        Width of the iframe.
-   * @param {string} height
-   *        Height of the iframe.
-   * @param {string} url
-   *        URL of the document to load into the iframe.
-   *
-   * @return {promise} A promise which is resolved with
-   * the iframe.
-   *
-   * This function creates an iframe, loads the specified document
-   * into it, sets the tooltip's content to the iframe, and returns
-   * a promise.
-   *
-   * When the document is loaded, the function gets the content window
-   * and resolves the promise with the content window.
-   */
-  setIFrameContent({width, height}, url) {
-    const def = defer();
-
-    // Create an iframe
-    const iframe = this.doc.createElementNS(XHTML_NS, "iframe");
-    iframe.setAttribute("transparent", true);
-    iframe.setAttribute("width", width);
-    iframe.setAttribute("height", height);
-    iframe.setAttribute("flex", "1");
-    iframe.setAttribute("tooltip", "aHTMLTooltip");
-    iframe.setAttribute("class", "devtools-tooltip-iframe");
-
-    // Wait for the load to initialize the widget
-    function onLoad() {
-      iframe.removeEventListener("load", onLoad, true);
-      def.resolve(iframe);
-    }
-    iframe.addEventListener("load", onLoad, true);
-
-    // load the document from url into the iframe
-    iframe.setAttribute("src", url);
-
-    // Put the iframe in the tooltip
-    this.content = iframe;
-
-    return def.promise;
-  }
-
-  /**
-   * Create the tooltip panel
-   */
-  _createPanel() {
-    const panel = this.doc.createXULElement("panel");
-    panel.setAttribute("hidden", true);
-    panel.setAttribute("ignorekeys", true);
-    panel.setAttribute("animate", false);
-
-    panel.setAttribute("consumeoutsideclicks",
-                       this.consumeOutsideClick);
-    panel.setAttribute("noautofocus", this.noAutoFocus);
-    panel.setAttribute("type", "arrow");
-    panel.setAttribute("level", "top");
-
-    panel.setAttribute("class", "devtools-tooltip theme-tooltip-panel");
-    this.doc.querySelector("window").appendChild(panel);
-
-    return panel;
-  }
-}
-
-module.exports = Tooltip;
deleted file mode 100644
--- a/devtools/client/debugger/content/tooltip/VariableContentHelper.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* 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/. */
-
-"use strict";
-
-const ChromeUtils = require("ChromeUtils");
-
-ChromeUtils.defineModuleGetter(this, "VariablesView",
-  "resource://devtools/client/shared/widgets/VariablesView.jsm");
-ChromeUtils.defineModuleGetter(this, "VariablesViewController",
-  "resource://devtools/client/shared/widgets/VariablesViewController.jsm");
-
-/**
- * Fill the tooltip with a variables view, inspecting an object via its
- * corresponding object actor, as specified in the remote debugging protocol.
- *
- * @param {Tooltip} tooltip
- *        The tooltip to use
- * @param {object} objectActor
- *        The value grip for the object actor.
- * @param {object} viewOptions [optional]
- *        Options for the variables view visualization.
- * @param {object} controllerOptions [optional]
- *        Options for the variables view controller.
- * @param {object} relayEvents [optional]
- *        A collection of events to listen on the variables view widget.
- *        For example, { fetched: () => ... }
- * @param {array} extraButtons [optional]
- *        An array of extra buttons to add.  Each element of the array
- *        should be of the form {label, className, command}.
- * @param {Toolbox} toolbox [optional]
- *        Pass the instance of the current toolbox if you want the variables
- *        view widget to allow highlighting and selection of DOM nodes
- */
-
-function setTooltipVariableContent(tooltip, objectActor,
-                                   viewOptions = {}, controllerOptions = {},
-                                   relayEvents = {}, extraButtons = [],
-                                   toolbox = null) {
-  const doc = tooltip.doc;
-  const vbox = doc.createXULElement("vbox");
-  vbox.className = "devtools-tooltip-variables-view-box";
-  vbox.setAttribute("flex", "1");
-
-  const innerbox = doc.createXULElement("vbox");
-  innerbox.className = "devtools-tooltip-variables-view-innerbox";
-  innerbox.setAttribute("flex", "1");
-  vbox.appendChild(innerbox);
-
-  for (const { label, className, command } of extraButtons) {
-    const button = doc.createXULElement("button");
-    button.className = className;
-    button.setAttribute("label", label);
-    button.addEventListener("command", command);
-    vbox.appendChild(button);
-  }
-
-  const widget = new VariablesView(innerbox, viewOptions);
-
-  // If a toolbox was provided, link it to the vview
-  if (toolbox) {
-    widget.toolbox = toolbox;
-  }
-
-  // Analyzing state history isn't useful with transient object inspectors.
-  widget.commitHierarchy = () => {};
-
-  for (const e in relayEvents) {
-    widget.on(e, relayEvents[e]);
-  }
-  VariablesViewController.attach(widget, controllerOptions);
-
-  // Some of the view options are allowed to change between uses.
-  widget.searchPlaceholder = viewOptions.searchPlaceholder;
-  widget.searchEnabled = viewOptions.searchEnabled;
-
-  // Use the object actor's grip to display it as a variable in the widget.
-  // The controller options are allowed to change between uses.
-  widget.controller.setSingleVariable(
-    { objectActor: objectActor }, controllerOptions);
-
-  tooltip.content = vbox;
-  tooltip.panel.setAttribute("clamped-dimensions", "");
-}
-
-exports.setTooltipVariableContent = setTooltipVariableContent;
deleted file mode 100644
--- a/devtools/client/debugger/content/tooltip/moz.build
+++ /dev/null
@@ -1,9 +0,0 @@
-# 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/.
-
-DevToolsModules(
-    'Tooltip.js',
-    'VariableContentHelper.js',
-)
deleted file mode 100644
--- a/devtools/client/debugger/content/tooltip/tooltips-old.css
+++ /dev/null
@@ -1,173 +0,0 @@
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-:root.theme-light {
-  --old-tooltip-simpletext-color: black;
-  --old-tooltip-simpletext-border: #d9e1e8;
-  --old-tooltip-arrow-vertical: url("chrome://devtools/skin/tooltip/arrow-vertical-light.png");
-  --old-tooltip-arrow-horizontal: url("chrome://devtools/skin/tooltip/arrow-horizontal-light.png");
-  --old-tooltip-arrow-vertical-2x: url("chrome://devtools/skin/tooltip/arrow-vertical-light@2x.png");
-  --old-tooltip-arrow-horizontal-2x: url("chrome://devtools/skin/tooltip/arrow-horizontal-light@2x.png");
-  --old-tooltip-arrowcontent-background: rgba(255, 255, 255, .9);
-  --old-tooltip-arrowcontent-border: #d9e1e8;
-}
-
-:root.theme-dark {
-  --old-tooltip-simpletext-color: white;
-  --old-tooltip-simpletext-border: #434850;
-  --old-tooltip-arrow-vertical: url("chrome://devtools/skin/tooltip/arrow-vertical-dark.png");
-  --old-tooltip-arrow-horizontal: url("chrome://devtools/skin/tooltip/arrow-horizontal-dark.png");
-  --old-tooltip-arrow-vertical-2x: url("chrome://devtools/skin/tooltip/arrow-vertical-dark@2x.png");
-  --old-tooltip-arrow-horizontal-2x: url("chrome://devtools/skin/tooltip/arrow-horizontal-dark@2x.png");
-  --old-tooltip-arrowcontent-background: rgba(19, 28, 38, .9);
-  --old-tooltip-arrowcontent-border: #434850;
-}
-
-.devtools-tooltip .panel-arrowcontent {
-  padding: 4px;
-}
-
-.devtools-tooltip .panel-arrowcontainer {
-  /* Reseting the transition used when panels are shown */
-  transition: none;
-  /* Panels slide up/down/left/right when they appear using a transform.
-  Since we want to remove the transition, we don't need to transform anymore
-  plus it can interfeer by causing mouseleave events on the underlying nodes */
-  transform: none;
-}
-
-.devtools-tooltip[clamped-dimensions] {
-  min-height: 100px;
-  max-height: 400px;
-  min-width: 100px;
-  max-width: 400px;
-}
-
-.devtools-tooltip[clamped-dimensions-no-min-height] {
-  min-height: 0;
-  max-height: 400px;
-  min-width: 100px;
-  max-width: 400px;
-}
-
-.devtools-tooltip[clamped-dimensions-no-max-or-min-height] {
-  min-width: 400px;
-  max-width: 400px;
-}
-
-.devtools-tooltip[clamped-dimensions] .panel-arrowcontent,
-.devtools-tooltip[clamped-dimensions-no-min-height] .panel-arrowcontent,
-.devtools-tooltip[clamped-dimensions-no-max-or-min-height] .panel-arrowcontent {
-  overflow: hidden;
-}
-
-.devtools-tooltip[wide] {
-  max-width: 600px;
-}
-
-/* Tooltip: Simple Text */
-
-.devtools-tooltip-simple-text {
-  max-width: 400px;
-  margin: 0 -4px; /* Compensate for the .panel-arrowcontent padding. */
-  padding: 8px 12px;
-  white-space: pre-wrap;
-}
-
-.devtools-tooltip-simple-text:first-child {
-  margin-top: -4px;
-}
-
-.devtools-tooltip-simple-text:last-child {
-  margin-bottom: -4px;
-}
-
-/* Tooltip: Variables View */
-
-.devtools-tooltip-variables-view-box {
-  margin: -4px; /* Compensate for the .panel-arrowcontent padding. */
-}
-
-.devtools-tooltip-variables-view-box .variable-or-property > .title {
-  padding-inline-end: 6px;
-}
-
-.devtools-tooltip-iframe {
-  border: none;
-  background: transparent;
-}
-
-/* Overring panel arrow images to fit with our light and dark themes */
-
-.theme-tooltip-panel .devtools-tooltip-simple-text:last-child {
-  border-bottom: 0;
-}
-
-.theme-tooltip-panel .panel-arrowcontent {
-  padding: 4px;
-  background: var(--old-tooltip-arrowcontent-background);
-  border-radius: 5px;
-  box-shadow: none;
-  border: 3px solid var(--old-tooltip-arrowcontent-border);
-}
-
-/* Overring panel arrow images to fit with our light and dark themes */
-
-.theme-tooltip-panel .panel-arrow {
-  --arrow-margin: -4px;
-}
-
-:root[platform="win"] .theme-tooltip-panel .panel-arrow {
-  --arrow-margin: -7px;
-}
-
-.theme-tooltip-panel .panel-arrow[side="top"],
-.theme-tooltip-panel .panel-arrow[side="bottom"] {
-  list-style-image: var(--old-tooltip-arrow-vertical);
-  /* !important is needed to override the popup.css rules in toolkit/themes */
-  width: 39px !important;
-  height: 16px !important;
-}
-
-.theme-tooltip-panel .panel-arrow[side="left"],
-.theme-tooltip-panel .panel-arrow[side="right"] {
-  list-style-image: var(--old-tooltip-arrow-horizontal);
-  /* !important is needed to override the popup.css rules in toolkit/themes */
-  width: 16px !important;
-  height: 39px !important;
-}
-
-.theme-tooltip-panel .panel-arrow[side="top"] {
-  margin-bottom: var(--arrow-margin);
-}
-
-.theme-tooltip-panel .panel-arrow[side="bottom"] {
-  margin-top: var(--arrow-margin);
-}
-
-.theme-tooltip-panel .panel-arrow[side="left"] {
-  margin-right: var(--arrow-margin);
-}
-
-.theme-tooltip-panel .panel-arrow[side="right"] {
-  margin-left: var(--arrow-margin);
-}
-
-@media (min-resolution: 1.1dppx) {
-  .theme-tooltip-panel .panel-arrow[side="top"],
-  .theme-tooltip-panel .panel-arrow[side="bottom"] {
-    list-style-image: var(--old-tooltip-arrow-vertical-2x);
-  }
-
-  .theme-tooltip-panel .panel-arrow[side="left"],
-  .theme-tooltip-panel .panel-arrow[side="right"] {
-    list-style-image: var(--old-tooltip-arrow-horizontal-2x);
-  }
-}
-
-.theme-tooltip-panel .devtools-tooltip-simple-text {
-  color: var(--old-tooltip-simpletext-color);
-  border-bottom: 1px solid var(--old-tooltip-simpletext-border);
-}
\ No newline at end of file
deleted file mode 100644
--- a/devtools/client/debugger/content/utils.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* 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/. */
-"use strict";
-
-const { reportException } = require("devtools/shared/DevToolsUtils");
-const { Task } = require("devtools/shared/task");
-
-function asPaused(client, func) {
-  if (client.state != "paused") {
-    return Task.spawn(function* () {
-      yield client.interrupt();
-      let result;
-
-      try {
-        result = yield func();
-      }
-      catch (e) {
-        // Try to put the debugger back in a working state by resuming
-        // it
-        yield client.resume();
-        throw e;
-      }
-
-      yield client.resume();
-      return result;
-    });
-  } else {
-    return func();
-  }
-}
-
-function handleError(err) {
-  reportException("promise", err.toString());
-}
-
-function onReducerEvents(controller, listeners, thisContext) {
-  Object.keys(listeners).forEach(name => {
-    const listener = listeners[name];
-    controller.onChange(name, payload => {
-      listener.call(thisContext, payload);
-    });
-  });
-}
-
-function _getIn(destObj, path) {
-  return path.reduce(function (acc, name) {
-    return acc[name];
-  }, destObj);
-}
-
-function mergeIn(destObj, path, value) {
-  path = [...path];
-  path.reverse();
-  var obj = path.reduce(function (acc, name) {
-    return { [name]: acc };
-  }, value);
-
-  return destObj.merge(obj, { deep: true });
-}
-
-function setIn(destObj, path, value) {
-  destObj = mergeIn(destObj, path, null);
-  return mergeIn(destObj, path, value);
-}
-
-function updateIn(destObj, path, fn) {
-  return setIn(destObj, path, fn(_getIn(destObj, path)));
-}
-
-function deleteIn(destObj, path) {
-  const objPath = path.slice(0, -1);
-  const propName = path[path.length - 1];
-  const obj = _getIn(destObj, objPath);
-  return setIn(destObj, objPath, obj.without(propName));
-}
-
-module.exports = {
-  asPaused,
-  handleError,
-  onReducerEvents,
-  mergeIn,
-  setIn,
-  updateIn,
-  deleteIn
-};
deleted file mode 100644
--- a/devtools/client/debugger/content/views/event-listeners-view.js
+++ /dev/null
@@ -1,296 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-/* import-globals-from ../../debugger-controller.js */
-
-const actions = require("../actions/event-listeners");
-const { bindActionCreators } = require("devtools/client/shared/vendor/redux");
-const { extend } = require("devtools/shared/extend");
-const { WidgetMethods } = require("devtools/client/shared/widgets/view-helpers");
-const { SideMenuWidget } = require("resource://devtools/client/shared/widgets/SideMenuWidget.jsm");
-
-/**
- * Functions handling the event listeners UI.
- */
-function EventListenersView(controller) {
-  dumpn("EventListenersView was instantiated");
-
-  this.actions = bindActionCreators(actions, controller.dispatch);
-  this.getState = () => controller.getState().eventListeners;
-
-  this._onCheck = this._onCheck.bind(this);
-  this._onClick = this._onClick.bind(this);
-
-  controller.onChange("event-listeners", this.renderListeners.bind(this));
-}
-
-EventListenersView.prototype = extend(WidgetMethods, {
-  /**
-   * Initialization function, called when the debugger is started.
-   */
-  initialize: function () {
-    dumpn("Initializing the EventListenersView");
-
-    this.widget = new SideMenuWidget(document.getElementById("event-listeners"), {
-      showItemCheckboxes: true,
-      showGroupCheckboxes: true
-    });
-
-    this.emptyText = L10N.getStr("noEventListenersText");
-    this._eventCheckboxTooltip = L10N.getStr("eventCheckboxTooltip");
-    this._onSelectorString = " " + L10N.getStr("eventOnSelector") + " ";
-    this._inSourceString = " " + L10N.getStr("eventInSource") + " ";
-    this._inNativeCodeString = L10N.getStr("eventNative");
-
-    this.widget.addEventListener("check", this._onCheck);
-    this.widget.addEventListener("click", this._onClick);
-  },
-
-  /**
-   * Destruction function, called when the debugger is closed.
-   */
-  destroy: function () {
-    dumpn("Destroying the EventListenersView");
-
-    this.widget.removeEventListener("check", this._onCheck);
-    this.widget.removeEventListener("click", this._onClick);
-  },
-
-  renderListeners: function (listeners) {
-    listeners.forEach(listener => {
-      this.addListener(listener, { staged: true });
-    });
-
-    // Flushes all the prepared events into the event listeners container.
-    this.commit();
-  },
-
-  /**
-   * Adds an event to this event listeners container.
-   *
-   * @param object aListener
-   *        The listener object coming from the active thread.
-   * @param object aOptions [optional]
-   *        Additional options for adding the source. Supported options:
-   *        - staged: true to stage the item to be appended later
-   */
-  addListener: function (aListener, aOptions = {}) {
-    let { node: { selector }, function: { url }, type } = aListener;
-    if (!type) return;
-
-    // Some listener objects may be added from plugins, thus getting
-    // translated to native code.
-    if (!url) {
-      url = this._inNativeCodeString;
-    }
-
-    // If an event item for this listener's url and type was already added,
-    // avoid polluting the view and simply increase the "targets" count.
-    let eventItem = this.getItemForPredicate(aItem =>
-      aItem.attachment.url == url &&
-      aItem.attachment.type == type);
-
-    if (eventItem) {
-      let { selectors, view: { targets } } = eventItem.attachment;
-      if (!selectors.includes(selector)) {
-        selectors.push(selector);
-        targets.setAttribute("value", L10N.getFormatStr("eventNodes", selectors.length));
-      }
-      return;
-    }
-
-    // There's no easy way of grouping event types into higher-level groups,
-    // so we need to do this by hand.
-    let is = (...args) => args.includes(type);
-    let has = str => type.includes(str);
-    let starts = str => type.startsWith(str);
-    let group;
-
-    if (starts("animation")) {
-      group = L10N.getStr("animationEvents");
-    } else if (starts("audio")) {
-      group = L10N.getStr("audioEvents");
-    } else if (is("levelchange")) {
-      group = L10N.getStr("batteryEvents");
-    } else if (is("cut", "copy", "paste")) {
-      group = L10N.getStr("clipboardEvents");
-    } else if (starts("composition")) {
-      group = L10N.getStr("compositionEvents");
-    } else if (starts("device")) {
-      group = L10N.getStr("deviceEvents");
-    } else if (is("fullscreenchange", "fullscreenerror", "orientationchange",
-      "overflow", "resize", "scroll", "underflow", "zoom")) {
-      group = L10N.getStr("displayEvents");
-    } else if (starts("drag") || starts("drop")) {
-      group = L10N.getStr("dragAndDropEvents");
-    } else if (starts("gamepad")) {
-      group = L10N.getStr("gamepadEvents");
-    } else if (is("canplay", "canplaythrough", "durationchange", "emptied",
-      "ended", "loadeddata", "loadedmetadata", "pause", "play", "playing",
-      "ratechange", "seeked", "seeking", "stalled", "suspend", "timeupdate",
-      "volumechange", "waiting")) {
-      group = L10N.getStr("mediaEvents");
-    } else if (is("blocked", "complete", "success", "upgradeneeded", "versionchange")) {
-      group = L10N.getStr("indexedDBEvents");
-    } else if (is("blur", "change", "focus", "focusin", "focusout", "invalid",
-      "reset", "select", "submit")) {
-      group = L10N.getStr("interactionEvents");
-    } else if (starts("key") || is("input")) {
-      group = L10N.getStr("keyboardEvents");
-    } else if (starts("mouse") || has("click") || is("contextmenu", "show", "wheel")) {
-      group = L10N.getStr("mouseEvents");
-    } else if (starts("DOM")) {
-      group = L10N.getStr("mutationEvents");
-    } else if (is("abort", "error", "hashchange", "load", "loadend", "loadstart",
-      "pagehide", "pageshow", "progress", "timeout", "unload", "uploadprogress",
-      "visibilitychange")) {
-      group = L10N.getStr("navigationEvents");
-    } else if (is("pointerlockchange", "pointerlockerror")) {
-      group = L10N.getStr("pointerLockEvents");
-    } else if (is("compassneedscalibration", "userproximity")) {
-      group = L10N.getStr("sensorEvents");
-    } else if (starts("storage")) {
-      group = L10N.getStr("storageEvents");
-    } else if (is("beginEvent", "endEvent", "repeatEvent")) {
-      group = L10N.getStr("timeEvents");
-    } else if (starts("touch")) {
-      group = L10N.getStr("touchEvents");
-    } else {
-      group = L10N.getStr("otherEvents");
-    }
-
-    // Create the element node for the event listener item.
-    const itemView = this._createItemView(type, selector, url);
-
-    // Event breakpoints survive target navigations. Make sure the newly
-    // inserted event item is correctly checked.
-    const activeEventNames = this.getState().activeEventNames;
-    const checkboxState = activeEventNames.includes(type);
-
-    // Append an event listener item to this container.
-    this.push([itemView.container], {
-      staged: aOptions.staged, /* stage the item to be appended later? */
-      attachment: {
-        url: url,
-        type: type,
-        view: itemView,
-        selectors: [selector],
-        group: group,
-        checkboxState: checkboxState,
-        checkboxTooltip: this._eventCheckboxTooltip
-      }
-    });
-  },
-
-  /**
-   * Gets all the event types known to this container.
-   *
-   * @return array
-   *         List of event types, for example ["load", "click"...]
-   */
-  getAllEvents: function () {
-    return this.attachments.map(e => e.type);
-  },
-
-  /**
-   * Gets the checked event types in this container.
-   *
-   * @return array
-   *         List of event types, for example ["load", "click"...]
-   */
-  getCheckedEvents: function () {
-    return this.attachments.filter(e => e.checkboxState).map(e => e.type);
-  },
-
-  /**
-   * Customization function for creating an item's UI.
-   *
-   * @param string aType
-   *        The event type, for example "click".
-   * @param string aSelector
-   *        The target element's selector.
-   * @param string url
-   *        The source url in which the event listener is located.
-   * @return object
-   *         An object containing the event listener view nodes.
-   */
-  _createItemView: function (aType, aSelector, aUrl) {
-    let container = document.createElement("hbox");
-    container.className = "dbg-event-listener";
-
-    let eventType = document.createElement("label");
-    eventType.className = "plain dbg-event-listener-type";
-    eventType.setAttribute("value", aType);
-    container.appendChild(eventType);
-
-    let typeSeparator = document.createElement("label");
-    typeSeparator.className = "plain dbg-event-listener-separator";
-    typeSeparator.setAttribute("value", this._onSelectorString);
-    container.appendChild(typeSeparator);
-
-    let eventTargets = document.createElement("label");
-    eventTargets.className = "plain dbg-event-listener-targets";
-    eventTargets.setAttribute("value", aSelector);
-    container.appendChild(eventTargets);
-
-    let selectorSeparator = document.createElement("label");
-    selectorSeparator.className = "plain dbg-event-listener-separator";
-    selectorSeparator.setAttribute("value", this._inSourceString);
-    container.appendChild(selectorSeparator);
-
-    let eventLocation = document.createElement("label");
-    eventLocation.className = "plain dbg-event-listener-location";
-    eventLocation.setAttribute("value", SourceUtils.getSourceLabel(aUrl));
-    eventLocation.setAttribute("flex", "1");
-    eventLocation.setAttribute("crop", "center");
-    container.appendChild(eventLocation);
-
-    return {
-      container: container,
-      type: eventType,
-      targets: eventTargets,
-      location: eventLocation
-    };
-  },
-
-  /**
-   * The check listener for the event listeners container.
-   */
-  _onCheck: function ({ detail: { description, checked }, target }) {
-    if (description == "item") {
-      this.getItemForElement(target).attachment.checkboxState = checked;
-
-      this.actions.updateEventBreakpoints(this.getCheckedEvents());
-      return;
-    }
-
-    // Check all the event items in this group.
-    this.items
-      .filter(e => e.attachment.group == description)
-      .forEach(e => this.callMethod("checkItem", e.target, checked));
-  },
-
-  /**
-   * The select listener for the event listeners container.
-   */
-  _onClick: function ({ target }) {
-    // Changing the checkbox state is handled by the _onCheck event. Avoid
-    // handling that again in this click event, so pass in "noSiblings"
-    // when retrieving the target's item, to ignore the checkbox.
-    let eventItem = this.getItemForElement(target, { noSiblings: true });
-    if (eventItem) {
-      let newState = eventItem.attachment.checkboxState ^= 1;
-      this.callMethod("checkItem", eventItem.target, newState);
-    }
-  },
-
-  _eventCheckboxTooltip: "",
-  _onSelectorString: "",
-  _inSourceString: "",
-  _inNativeCodeString: ""
-});
-
-module.exports = EventListenersView;
deleted file mode 100644
--- a/devtools/client/debugger/content/views/moz.build
+++ /dev/null
@@ -1,9 +0,0 @@
-# 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/.
-
-DevToolsModules(
-    'event-listeners-view.js',
-    'sources-view.js'
-)
deleted file mode 100644
--- a/devtools/client/debugger/content/views/sources-view.js
+++ /dev/null
@@ -1,1374 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-/* import-globals-from ../../debugger-controller.js */
-
-const utils = require("../utils");
-const {
-  getSelectedSource,
-  getSourceByURL,
-  getBreakpoint,
-  getBreakpoints,
-  makeLocationId
-} = require("../queries");
-const actions = Object.assign(
-  {},
-  require("../actions/sources"),
-  require("../actions/breakpoints")
-);
-const { bindActionCreators } = require("devtools/client/shared/vendor/redux");
-const { extend } = require("devtools/shared/extend");
-const {
-  WidgetMethods,
-  setNamedTimeout
-} = require("devtools/client/shared/widgets/view-helpers");
-const { Task } = require("devtools/shared/task");
-const { SideMenuWidget } = require("resource://devtools/client/shared/widgets/SideMenuWidget.jsm");
-const { gDevTools } = require("devtools/client/framework/devtools");
-const { KeyCodes } = require("devtools/client/shared/keycodes");
-loader.lazyRequireGetter(this, "openContentLink", "devtools/client/shared/link", true);
-
-const NEW_SOURCE_DISPLAY_DELAY = 200; // ms
-const FUNCTION_SEARCH_POPUP_POSITION = "topcenter bottomleft";
-const BREAKPOINT_LINE_TOOLTIP_MAX_LENGTH = 1000; // chars
-const BREAKPOINT_CONDITIONAL_POPUP_POSITION = "before_start";
-const BREAKPOINT_CONDITIONAL_POPUP_OFFSET_X = 7; // px
-const BREAKPOINT_CONDITIONAL_POPUP_OFFSET_Y = -3; // px
-
-/**
- * Functions handling the sources UI.
- */
-function SourcesView(controller, DebuggerView) {
-  dumpn("SourcesView was instantiated");
-
-  utils.onReducerEvents(controller, {
-    "source": this.renderSource,
-    "blackboxed": this.renderBlackBoxed,
-    "prettyprinted": this.updateToolbarButtonsState,
-    "source-selected": this.renderSourceSelected,
-    "breakpoint-updated": bp => this.renderBreakpoint(bp),
-    "breakpoint-enabled": bp => this.renderBreakpoint(bp),
-    "breakpoint-disabled": bp => this.renderBreakpoint(bp),
-    "breakpoint-removed": bp => this.renderBreakpoint(bp, true),
-  }, this);
-
-  this.getState = controller.getState;
-  this.actions = bindActionCreators(actions, controller.dispatch);
-  this.DebuggerView = DebuggerView;
-  this.Parser = DebuggerController.Parser;
-
-  this.togglePrettyPrint = this.togglePrettyPrint.bind(this);
-  this.toggleBlackBoxing = this.toggleBlackBoxing.bind(this);
-  this.toggleBreakpoints = this.toggleBreakpoints.bind(this);
-
-  this._onEditorCursorActivity = this._onEditorCursorActivity.bind(this);
-  this._onMouseDown = this._onMouseDown.bind(this);
-  this._onSourceSelect = this._onSourceSelect.bind(this);
-  this._onStopBlackBoxing = this._onStopBlackBoxing.bind(this);
-  this._onBreakpointRemoved = this._onBreakpointRemoved.bind(this);
-  this._onBreakpointClick = this._onBreakpointClick.bind(this);
-  this._onBreakpointCheckboxClick = this._onBreakpointCheckboxClick.bind(this);
-  this._onConditionalPopupShowing = this._onConditionalPopupShowing.bind(this);
-  this._onConditionalPopupShown = this._onConditionalPopupShown.bind(this);
-  this._onConditionalPopupHiding = this._onConditionalPopupHiding.bind(this);
-  this._onConditionalTextboxKeyPress = this._onConditionalTextboxKeyPress.bind(this);
-  this._onEditorContextMenuOpen = this._onEditorContextMenuOpen.bind(this);
-  this._onCopyUrlCommand = this._onCopyUrlCommand.bind(this);
-  this._onNewTabCommand = this._onNewTabCommand.bind(this);
-  this._onConditionalPopupHidden = this._onConditionalPopupHidden.bind(this);
-}
-
-SourcesView.prototype = extend(WidgetMethods, {
-  /**
-   * Initialization function, called when the debugger is started.
-   */
-  initialize: function (isWorker) {
-    dumpn("Initializing the SourcesView");
-
-    this.widget = new SideMenuWidget(document.getElementById("sources"), {
-      contextMenu: document.getElementById("debuggerSourcesContextMenu"),
-      showArrows: true
-    });
-
-    this._preferredSourceURL = null;
-    this._unnamedSourceIndex = 0;
-    this.emptyText = L10N.getStr("noSourcesText");
-    this._blackBoxCheckboxTooltip = L10N.getStr("blackboxCheckboxTooltip2");
-
-    this._commandset = document.getElementById("debuggerCommands");
-    this._popupset = document.getElementById("debuggerPopupset");
-    this._cmPopup = document.getElementById("sourceEditorContextMenu");
-    this._cbPanel = document.getElementById("conditional-breakpoint-panel");
-    this._cbTextbox = document.getElementById("conditional-breakpoint-panel-textbox");
-    this._blackBoxButton = document.getElementById("black-box");
-    this._stopBlackBoxButton = document.getElementById("black-boxed-message-button");
-    this._prettyPrintButton = document.getElementById("pretty-print");
-    this._toggleBreakpointsButton = document.getElementById("toggle-breakpoints");
-    this._newTabMenuItem = document.getElementById("debugger-sources-context-newtab");
-    this._copyUrlMenuItem = document.getElementById("debugger-sources-context-copyurl");
-
-    this._noResultsFoundToolTip = new Tooltip(document);
-    this._noResultsFoundToolTip.defaultPosition = FUNCTION_SEARCH_POPUP_POSITION;
-
-    // We don't show the pretty print button if debugger a worker
-    // because it simply doesn't work yet. (bug 1273730)
-    if (Prefs.prettyPrintEnabled && !isWorker) {
-      this._prettyPrintButton.removeAttribute("hidden");
-    }
-
-    this._editorContainer = document.getElementById("editor");
-    this._editorContainer.addEventListener("mousedown", this._onMouseDown);
-
-    this.widget.addEventListener("select", this._onSourceSelect);
-
-    this._stopBlackBoxButton.addEventListener("click", this._onStopBlackBoxing);
-    this._cbPanel.addEventListener("popupshowing", this._onConditionalPopupShowing);
-    this._cbPanel.addEventListener("popupshown", this._onConditionalPopupShown);
-    this._cbPanel.addEventListener("popuphiding", this._onConditionalPopupHiding);
-    this._cbPanel.addEventListener("popuphidden", this._onConditionalPopupHidden);
-    this._cbTextbox.addEventListener("keypress", this._onConditionalTextboxKeyPress);
-    this._copyUrlMenuItem.addEventListener("command", this._onCopyUrlCommand);
-    this._newTabMenuItem.addEventListener("command", this._onNewTabCommand);
-
-    this._cbPanel.hidden = true;
-    this.allowFocusOnRightClick = true;
-    this.autoFocusOnSelection = false;
-    this.autoFocusOnFirstItem = false;
-
-    // Sort the contents by the displayed label.
-    this.sortContents((aFirst, aSecond) => {
-      return +(aFirst.attachment.label.toLowerCase() >
-               aSecond.attachment.label.toLowerCase());
-    });
-
-    // Sort known source groups towards the end of the list
-    this.widget.groupSortPredicate = function (a, b) {
-      if ((a in KNOWN_SOURCE_GROUPS) == (b in KNOWN_SOURCE_GROUPS)) {
-        return a.localeCompare(b);
-      }
-      return (a in KNOWN_SOURCE_GROUPS) ? 1 : -1;
-    };
-
-    this.DebuggerView.editor.on("popupOpen", this._onEditorContextMenuOpen);
-
-    this._addCommands();
-  },
-
-  /**
-   * Destruction function, called when the debugger is closed.
-   */
-  destroy: function () {
-    dumpn("Destroying the SourcesView");
-
-    this.widget.removeEventListener("select", this._onSourceSelect);
-    this._stopBlackBoxButton.removeEventListener("click", this._onStopBlackBoxing);
-    this._cbPanel.removeEventListener("popupshowing", this._onConditionalPopupShowing);
-    this._cbPanel.removeEventListener("popupshown", this._onConditionalPopupShown);
-    this._cbPanel.removeEventListener("popuphiding", this._onConditionalPopupHiding);
-    this._cbPanel.removeEventListener("popuphidden", this._onConditionalPopupHidden);
-    this._cbTextbox.removeEventListener("keypress", this._onConditionalTextboxKeyPress);
-    this._copyUrlMenuItem.removeEventListener("command", this._onCopyUrlCommand);
-    this._newTabMenuItem.removeEventListener("command", this._onNewTabCommand);
-    this.DebuggerView.editor.off("popupOpen", this._onEditorContextMenuOpen, false);
-  },
-
-  empty: function () {
-    WidgetMethods.empty.call(this);
-    this._unnamedSourceIndex = 0;
-    this._selectedBreakpoint = null;
-  },
-
-  /**
-   * Add commands that XUL can fire.
-   */
-  _addCommands: function () {
-    XULUtils.addCommands(this._commandset, {
-      addBreakpointCommand: e => this._onCmdAddBreakpoint(e),
-      addConditionalBreakpointCommand: e => this._onCmdAddConditionalBreakpoint(e),
-      blackBoxCommand: () => this.toggleBlackBoxing(),
-      unBlackBoxButton: () => this._onStopBlackBoxing(),
-      prettyPrintCommand: () => this.togglePrettyPrint(),
-      toggleBreakpointsCommand: () =>this.toggleBreakpoints(),
-      nextSourceCommand: () => this.selectNextItem(),
-      prevSourceCommand: () => this.selectPrevItem()
-    });
-  },
-
-  /**
-   * Sets the preferred location to be selected in this sources container.
-   * @param string aUrl
-   */
-  set preferredSource(aUrl) {
-    this._preferredValue = aUrl;
-
-    // Selects the element with the specified value in this sources container,
-    // if already inserted.
-    if (this.containsValue(aUrl)) {
-      this.selectedValue = aUrl;
-    }
-  },
-
-  sourcesDidUpdate: function () {
-    if (!getSelectedSource(this.getState())) {
-      let url = this._preferredSourceURL;
-      let source = url && getSourceByURL(this.getState(), url);
-      if (source) {
-        this.actions.selectSource(source);
-      }
-      else {
-        setNamedTimeout("new-source", NEW_SOURCE_DISPLAY_DELAY, () => {
-          if (!getSelectedSource(this.getState()) && this.itemCount > 0) {
-            this.actions.selectSource(this.getItemAtIndex(0).attachment.source);
-          }
-        });
-      }
-    }
-  },
-
-  renderSource: function (source) {
-    this.addSource(source, { staged: false });
-    for (let bp of getBreakpoints(this.getState())) {
-      if (bp.location.actor === source.actor) {
-        this.renderBreakpoint(bp);
-      }
-    }
-    this.sourcesDidUpdate();
-  },
-
-  /**
-   * Adds a source to this sources container.
-   *
-   * @param object aSource
-   *        The source object coming from the active thread.
-   * @param object aOptions [optional]
-   *        Additional options for adding the source. Supported options:
-   *        - staged: true to stage the item to be appended later
-   */
-  addSource: function (aSource, aOptions = {}) {
-    if (!aSource.url && !aOptions.force) {
-      // We don't show any unnamed eval scripts yet (see bug 1124106)
-      return;
-    }
-
-    let { label, group, unicodeUrl } = this._parseUrl(aSource);
-
-    let contents = document.createElement("label");
-    contents.className = "plain dbg-source-item";
-    contents.setAttribute("value", label);
-    contents.setAttribute("crop", "start");
-    contents.setAttribute("flex", "1");
-    contents.setAttribute("tooltiptext", unicodeUrl);
-
-    if (aSource.introductionType === "wasm") {
-      const wasm = document.createElement("box");
-      wasm.className = "dbg-wasm-item";
-      const icon = document.createElement("box");
-      icon.setAttribute("tooltiptext", L10N.getStr("experimental"));
-      icon.className = "icon";
-      wasm.appendChild(icon);
-      wasm.appendChild(contents);
-
-      contents = wasm;
-    }
-
-    // If the source is blackboxed, apply the appropriate style.
-    if (gThreadClient.source(aSource).isBlackBoxed) {
-      contents.classList.add("black-boxed");
-    }
-
-    // Append a source item to this container.
-    this.push([contents, aSource.actor], {
-      staged: aOptions.staged, /* stage the item to be appended later? */
-      attachment: {
-        label: label,
-        group: group,
-        checkboxState: !aSource.isBlackBoxed,
-        checkboxTooltip: this._blackBoxCheckboxTooltip,
-        source: aSource
-      }
-    });
-  },
-
-  _parseUrl: function (aSource) {
-    let fullUrl = aSource.url;
-    let url, unicodeUrl, label, group;
-
-    if (!fullUrl) {
-      unicodeUrl = "SCRIPT" + this._unnamedSourceIndex++;
-      label = unicodeUrl;
-      group = L10N.getStr("anonymousSourcesLabel");
-    }
-    else {
-      let url = fullUrl.split(" -> ").pop();
-      label = aSource.addonPath ? aSource.addonPath : SourceUtils.getSourceLabel(url);
-      group = aSource.addonID ? aSource.addonID : SourceUtils.getSourceGroup(url);
-      unicodeUrl = NetworkHelper.convertToUnicode(unescape(fullUrl));
-    }
-
-    return {
-      label: label,
-      group: group,
-      unicodeUrl: unicodeUrl
-    };
-  },
-
-  renderBreakpoint: function (breakpoint, removed) {
-    if (removed) {
-      // Be defensive about the breakpoint not existing.
-      if (this._getBreakpoint(breakpoint)) {
-        this._removeBreakpoint(breakpoint);
-      }
-    }
-    else {
-      if (this._getBreakpoint(breakpoint)) {
-        this._updateBreakpointStatus(breakpoint);
-      }
-      else {
-        this._addBreakpoint(breakpoint);
-      }
-    }
-  },
-
-  /**
-   * Adds a breakpoint to this sources container.
-   *
-   * @param object aBreakpointClient
-   *               See Breakpoints.prototype._showBreakpoint
-   * @param object aOptions [optional]
-   *        @see DebuggerController.Breakpoints.addBreakpoint
-   */
-  _addBreakpoint: function (breakpoint, options = {}) {
-    let disabled = breakpoint.disabled;
-    let location = breakpoint.location;
-
-    // Get the source item to which the breakpoint should be attached.
-    let sourceItem = this.getItemByValue(location.actor);
-    if (!sourceItem) {
-      return;
-    }
-
-    // Create the element node and menu popup for the breakpoint item.
-    let breakpointArgs = extend(breakpoint.asMutable(), options);
-    let breakpointView = this._createBreakpointView.call(this, breakpointArgs);
-    let contextMenu = this._createContextMenu.call(this, breakpointArgs);
-
-    // Append a breakpoint child item to the corresponding source item.
-    sourceItem.append(breakpointView.container, {
-      attachment: extend(breakpointArgs, {
-        actor: location.actor,
-        line: location.line,
-        view: breakpointView,
-        popup: contextMenu
-      }),
-      attributes: [
-        ["contextmenu", contextMenu.menupopupId]
-      ],
-      // Make sure that when the breakpoint item is removed, the corresponding
-      // menupopup and commandset are also destroyed.
-      finalize: this._onBreakpointRemoved
-    });
-
-    if (typeof breakpoint.condition === "string") {
-      this.highlightBreakpoint(breakpoint.location, {
-        openPopup: true,
-        noEditorUpdate: true
-      });
-    }
-
-    window.emit(EVENTS.BREAKPOINT_SHOWN_IN_PANE);
-  },
-
-  /**
-   * Removes a breakpoint from this sources container.
-   * It does not also remove the breakpoint from the controller. Be careful.
-   *
-   * @param object aLocation
-   *        @see DebuggerController.Breakpoints.addBreakpoint
-   */
-  _removeBreakpoint: function (breakpoint) {
-    // When a parent source item is removed, all the child breakpoint items are
-    // also automagically removed.
-    let sourceItem = this.getItemByValue(breakpoint.location.actor);
-    if (!sourceItem) {
-      return;
-    }
-
-    // Clear the breakpoint view.
-    sourceItem.remove(this._getBreakpoint(breakpoint));
-
-    if (this._selectedBreakpoint &&
-       (queries.makeLocationId(this._selectedBreakpoint.location) ===
-        queries.makeLocationId(breakpoint.location))) {
-      this._selectedBreakpoint = null;
-    }
-
-    window.emit(EVENTS.BREAKPOINT_HIDDEN_IN_PANE);
-  },
-
-  _getBreakpoint: function (bp) {
-    return this.getItemForPredicate(item => {
-      return item.attachment.actor === bp.location.actor &&
-        item.attachment.line === bp.location.line;
-    });
-  },
-
-  /**
-   * Updates a breakpoint.
-   *
-   * @param object breakpoint
-   */
-  _updateBreakpointStatus: function (breakpoint) {
-    let location = breakpoint.location;
-    let breakpointItem = this._getBreakpoint(getBreakpoint(this.getState(), location));
-    if (!breakpointItem) {
-      return promise.reject(new Error("No breakpoint found."));
-    }
-
-    // Breakpoint will now be enabled.
-    let attachment = breakpointItem.attachment;
-
-    // Update the corresponding menu items to reflect the enabled state.
-    let prefix = "bp-cMenu-"; // "breakpoints context menu"
-    let identifier = makeLocationId(location);
-    let enableSelfId = prefix + "enableSelf-" + identifier + "-menuitem";
-    let disableSelfId = prefix + "disableSelf-" + identifier + "-menuitem";
-    let enableSelf = document.getElementById(enableSelfId);
-    let disableSelf = document.getElementById(disableSelfId);
-
-    if (breakpoint.disabled) {
-      enableSelf.removeAttribute("hidden");
-      disableSelf.setAttribute("hidden", true);
-      attachment.view.checkbox.removeAttribute("checked");
-    }
-    else {
-      enableSelf.setAttribute("hidden", true);
-      disableSelf.removeAttribute("hidden");
-      attachment.view.checkbox.setAttribute("checked", "true");
-
-      // Update the breakpoint toggle button checked state.
-      this._toggleBreakpointsButton.removeAttribute("checked");
-    }
-
-  },
-
-  /**
-   * Highlights a breakpoint in this sources container.
-   *
-   * @param object aLocation
-   *        @see DebuggerController.Breakpoints.addBreakpoint
-   * @param object aOptions [optional]
-   *        An object containing some of the following boolean properties:
-   *          - openPopup: tells if the expression popup should be shown.
-   *          - noEditorUpdate: tells if you want to skip editor updates.
-   */
-  highlightBreakpoint: function (aLocation, aOptions = {}) {
-    let breakpoint = getBreakpoint(this.getState(), aLocation);
-    if (!breakpoint) {
-      return;
-    }
-
-    // Breakpoint will now be selected.
-    this._selectBreakpoint(breakpoint);
-
-    // Update the editor location if necessary.
-    if (!aOptions.noEditorUpdate) {
-      this.DebuggerView.setEditorLocation(aLocation.actor, aLocation.line, { noDebug: true });
-    }
-
-    // If the breakpoint requires a new conditional expression, display
-    // the panel to input the corresponding expression.
-    if (aOptions.openPopup) {
-      return this._openConditionalPopup();
-    } else {
-      return this._hideConditionalPopup();
-    }
-  },
-
-  /**
-   * Highlight the breakpoint on the current currently focused line/column
-   * if it exists.
-   */
-  highlightBreakpointAtCursor: function () {
-    let actor = this.selectedValue;
-    let line = this.DebuggerView.editor.getCursor().line + 1;
-
-    let location = { actor: actor, line: line };
-    this.highlightBreakpoint(location, { noEditorUpdate: true });
-  },
-
-  /**
-   * Unhighlights the current breakpoint in this sources container.
-   */
-  unhighlightBreakpoint: function () {
-    this._hideConditionalPopup();
-    this._unselectBreakpoint();
-  },
-
-   /**
-    * Display the message thrown on breakpoint condition
-    */
-  showBreakpointConditionThrownMessage: function (aLocation, aMessage = "") {
-    let breakpointItem = this._getBreakpoint(getBreakpoint(this.getState(), aLocation));
-    if (!breakpointItem) {
-      return;
-    }
-    let attachment = breakpointItem.attachment;
-    attachment.view.container.classList.add("dbg-breakpoint-condition-thrown");
-    attachment.view.message.setAttribute("value", aMessage);
-  },
-
-  /**
-   * Update the checked/unchecked and enabled/disabled states of the buttons in
-   * the sources toolbar based on the currently selected source's state.
-   */
-  updateToolbarButtonsState: function (source) {
-    if (source.isBlackBoxed) {
-      this._blackBoxButton.setAttribute("checked", true);
-      this._prettyPrintButton.setAttribute("checked", true);
-    } else {
-      this._blackBoxButton.removeAttribute("checked");
-      this._prettyPrintButton.removeAttribute("checked");
-    }
-
-    if (source.isPrettyPrinted) {
-      this._prettyPrintButton.setAttribute("checked", true);
-    } else {
-      this._prettyPrintButton.removeAttribute("checked");
-    }
-  },
-
-  /**
-   * Toggle the pretty printing of the selected source.
-   */
-  togglePrettyPrint: function () {
-    if (this._prettyPrintButton.hasAttribute("disabled")) {
-      return;
-    }
-
-    this.DebuggerView.showProgressBar();
-    const source = getSelectedSource(this.getState());
-    const sourceClient = gThreadClient.source(source);
-    const shouldPrettyPrint = !source.isPrettyPrinted;
-
-    // This is only here to give immediate feedback,
-    // `renderPrettyPrinted` will set the final status of the buttons
-    if (shouldPrettyPrint) {
-      this._prettyPrintButton.setAttribute("checked", true);
-    } else {
-      this._prettyPrintButton.removeAttribute("checked");
-    }
-
-    this.actions.togglePrettyPrint(source);
-  },
-
-  /**
-   * Toggle the black boxed state of the selected source.
-   */
-  toggleBlackBoxing: Task.async(function* () {
-    const source = getSelectedSource(this.getState());
-    const shouldBlackBox = !source.isBlackBoxed;
-
-    // Be optimistic that the (un-)black boxing will succeed, so
-    // enable/disable the pretty print button and check/uncheck the
-    // black box button immediately.
-    if (shouldBlackBox) {
-      this._prettyPrintButton.setAttribute("disabled", true);
-      this._blackBoxButton.setAttribute("checked", true);
-    } else {
-      this._prettyPrintButton.removeAttribute("disabled");
-      this._blackBoxButton.removeAttribute("checked");
-    }
-
-    this.actions.blackbox(source, shouldBlackBox);
-  }),
-
-  renderBlackBoxed: function (source) {
-    const sourceItem = this.getItemByValue(source.actor);
-    sourceItem.prebuiltNode.classList.toggle(
-      "black-boxed",
-      source.isBlackBoxed
-    );
-
-    if (getSelectedSource(this.getState()).actor === source.actor) {
-      this.updateToolbarButtonsState(source);
-    }
-  },
-
-  /**
-   * Toggles all breakpoints enabled/disabled.
-   */
-  toggleBreakpoints: function () {
-    let breakpoints = getBreakpoints(this.getState());
-    let hasBreakpoints = breakpoints.length > 0;
-    let hasEnabledBreakpoints = breakpoints.some(bp => !bp.disabled);
-
-    if (hasBreakpoints && hasEnabledBreakpoints) {
-      this._toggleBreakpointsButton.setAttribute("checked", true);
-      this._onDisableAll();
-    } else {
-      this._toggleBreakpointsButton.removeAttribute("checked");
-      this._onEnableAll();
-    }
-  },
-
-  hidePrettyPrinting: function () {
-    this._prettyPrintButton.style.display = "none";
-
-    if (this._blackBoxButton.style.display === "none") {
-      let sep = document.querySelector("#sources-toolbar .devtools-separator");
-      sep.style.display = "none";
-    }
-  },
-
-  hideBlackBoxing: function () {
-    this._blackBoxButton.style.display = "none";
-
-    if (this._prettyPrintButton.style.display === "none") {
-      let sep = document.querySelector("#sources-toolbar .devtools-separator");
-      sep.style.display = "none";
-    }
-  },
-
-  getDisplayURL: function (source) {
-    if (!source.url) {
-      return this.getItemByValue(source.actor).attachment.label;
-    }
-    return NetworkHelper.convertToUnicode(unescape(source.url));
-  },
-
-  /**
-   * Marks a breakpoint as selected in this sources container.
-   *
-   * @param object aItem
-   *        The breakpoint item to select.
-   */
-  _selectBreakpoint: function (bp) {
-    if (this._selectedBreakpoint === bp) {
-      return;
-    }
-    this._unselectBreakpoint();
-    this._selectedBreakpoint = bp;
-
-    const item = this._getBreakpoint(bp);
-    item.target.classList.add("selected");
-
-    // Ensure the currently selected breakpoint is visible.
-    this.widget.ensureElementIsVisible(item.target);
-  },
-
-  /**
-   * Marks the current breakpoint as unselected in this sources container.
-   */
-  _unselectBreakpoint: function () {
-    if (!this._selectedBreakpoint) {
-      return;
-    }
-
-    const item = this._getBreakpoint(this._selectedBreakpoint);
-    item.target.classList.remove("selected");
-
-    this._selectedBreakpoint = null;
-  },
-
-  /**
-   * Opens a conditional breakpoint's expression input popup.
-   */
-  _openConditionalPopup: function () {
-    let breakpointItem = this._getBreakpoint(this._selectedBreakpoint);
-    let attachment = breakpointItem.attachment;
-    // Check if this is an enabled conditional breakpoint, and if so,
-    // retrieve the current conditional epression.
-    let bp = getBreakpoint(this.getState(), attachment);
-    let expr = (bp ? (bp.condition || "") : "");
-    let cbPanel = this._cbPanel;
-
-    // Update the conditional expression textbox. If no expression was
-    // previously set, revert to using an empty string by default.
-    this._cbTextbox.value = expr;
-
-    function openPopup() {
-      // Show the conditional expression panel. The popup arrow should be pointing
-      // at the line number node in the breakpoint item view.
-      cbPanel.hidden = false;
-      cbPanel.openPopup(breakpointItem.attachment.view.lineNumber,
-                              BREAKPOINT_CONDITIONAL_POPUP_POSITION,
-                              BREAKPOINT_CONDITIONAL_POPUP_OFFSET_X,
-                              BREAKPOINT_CONDITIONAL_POPUP_OFFSET_Y);
-
-      cbPanel.removeEventListener("popuphidden", openPopup);
-    }
-
-    // Wait until the other cb panel is closed
-    if (!this._cbPanel.hidden) {
-      this._cbPanel.addEventListener("popuphidden", openPopup);
-    } else {
-      openPopup();
-    }
-  },
-
-  /**
-   * Hides a conditional breakpoint's expression input popup.
-   */
-  _hideConditionalPopup: function () {
-    // Sometimes this._cbPanel doesn't have hidePopup method which doesn't
-    // break anything but simply outputs an exception to the console.
-    if (this._cbPanel.hidePopup) {
-      this._cbPanel.hidePopup();
-    }
-  },
-
-  /**
-   * Customization function for creating a breakpoint item's UI.
-   *
-   * @param object aOptions
-   *        A couple of options or flags supported by this operation:
-   *          - location: the breakpoint's source location and line number
-   *          - disabled: the breakpoint's disabled state, boolean
-   *          - text: the breakpoint's line text to be displayed
-   *          - message: thrown string when the breakpoint condition throws
-   * @return object
-   *         An object containing the breakpoint container, checkbox,
-   *         line number and line text nodes.
-   */
-  _createBreakpointView: function (aOptions) {
-    let { location, disabled, text, message, isWasm } = aOptions;
-    let identifier = makeLocationId(location);
-
-    let checkbox = document.createElement("checkbox");
-    if (!disabled) {
-      checkbox.setAttribute("checked", true);
-    }
-    checkbox.className = "dbg-breakpoint-checkbox";
-
-    let lineNumberNode = document.createElement("label");
-    lineNumberNode.className = "plain dbg-breakpoint-line";
-    let lineNumberStr = !isWasm ? location.line.toString() :
-      location.line.toString(16).toUpperCase();
-    lineNumberNode.setAttribute("value", lineNumberStr);
-
-    let lineTextNode = document.createElement("label");
-    lineTextNode.className = "plain dbg-breakpoint-text";
-    lineTextNode.setAttribute("value", text);
-    lineTextNode.setAttribute("crop", "end");
-    lineTextNode.setAttribute("flex", "1");
-
-    let tooltip = text ? text.substr(0, BREAKPOINT_LINE_TOOLTIP_MAX_LENGTH) : "";
-    lineTextNode.setAttribute("tooltiptext", tooltip);
-
-    let thrownNode = document.createElement("label");
-    thrownNode.className = "plain dbg-breakpoint-condition-thrown-message dbg-breakpoint-text";
-    thrownNode.setAttribute("value", message);
-    thrownNode.setAttribute("crop", "end");
-    thrownNode.setAttribute("flex", "1");
-
-    let bpLineContainer = document.createElement("hbox");
-    bpLineContainer.className = "plain dbg-breakpoint-line-container";
-    bpLineContainer.setAttribute("flex", "1");
-
-    bpLineContainer.appendChild(lineNumberNode);
-    bpLineContainer.appendChild(lineTextNode);
-
-    let bpDetailContainer = document.createElement("vbox");
-    bpDetailContainer.className = "plain dbg-breakpoint-detail-container";
-    bpDetailContainer.setAttribute("flex", "1");
-
-    bpDetailContainer.appendChild(bpLineContainer);
-    bpDetailContainer.appendChild(thrownNode);
-
-    let container = document.createElement("hbox");
-    container.id = "breakpoint-" + identifier;
-    container.className = "dbg-breakpoint side-menu-widget-item-other";
-    container.classList.add("devtools-monospace");
-    container.setAttribute("align", "center");
-    container.setAttribute("flex", "1");
-
-    container.addEventListener("click", this._onBreakpointClick);
-    checkbox.addEventListener("click", this._onBreakpointCheckboxClick);
-
-    container.appendChild(checkbox);
-    container.appendChild(bpDetailContainer);
-
-    return {
-      container: container,
-      checkbox: checkbox,
-      lineNumber: lineNumberNode,
-      lineText: lineTextNode,
-      message: thrownNode
-    };
-  },
-
-  /**
-   * Creates a context menu for a breakpoint element.
-   *
-   * @param object aOptions
-   *        A couple of options or flags supported by this operation:
-   *          - location: the breakpoint's source location and line number
-   *          - disabled: the breakpoint's disabled state, boolean
-   * @return object
-   *         An object containing the breakpoint commandset and menu popup ids.
-   */
-  _createContextMenu: function (aOptions) {
-    let { location, disabled } = aOptions;
-    let identifier = makeLocationId(location);
-
-    let commandset = document.createElement("commandset");
-    let menupopup = document.createElement("menupopup");
-    commandset.id = "bp-cSet-" + identifier;
-    menupopup.id = "bp-mPop-" + identifier;
-
-    createMenuItem.call(this, "enableSelf", !disabled);
-    createMenuItem.call(this, "disableSelf", disabled);
-    createMenuItem.call(this, "deleteSelf");
-    createMenuSeparator();
-    createMenuItem.call(this, "setConditional");
-    createMenuSeparator();
-    createMenuItem.call(this, "enableOthers");
-    createMenuItem.call(this, "disableOthers");
-    createMenuItem.call(this, "deleteOthers");
-    createMenuSeparator();
-    createMenuItem.call(this, "enableAll");
-    createMenuItem.call(this, "disableAll");
-    createMenuSeparator();
-    createMenuItem.call(this, "deleteAll");
-
-    this._popupset.appendChild(menupopup);
-    this._commandset.appendChild(commandset);
-
-    return {
-      commandsetId: commandset.id,
-      menupopupId: menupopup.id
-    };
-
-    /**
-     * Creates a menu item specified by a name with the appropriate attributes
-     * (label and handler).
-     *
-     * @param string aName
-     *        A global identifier for the menu item.
-     * @param boolean aHiddenFlag
-     *        True if this menuitem should be hidden.
-     */
-    function createMenuItem(aName, aHiddenFlag) {
-      let menuitem = document.createElement("menuitem");
-      let command = document.createElement("command");
-
-      let prefix = "bp-cMenu-"; // "breakpoints context menu"
-      let commandId = prefix + aName + "-" + identifier + "-command";
-      let menuitemId = prefix + aName + "-" + identifier + "-menuitem";
-
-      let label = L10N.getStr("breakpointMenuItem." + aName);
-      let func = "_on" + aName.charAt(0).toUpperCase() + aName.slice(1);
-
-      command.id = commandId;
-      command.setAttribute("label", label);
-      command.addEventListener("command", () => this[func](location));
-
-      menuitem.id = menuitemId;
-      menuitem.setAttribute("command", commandId);
-      aHiddenFlag && menuitem.setAttribute("hidden", "true");
-
-      commandset.appendChild(command);
-      menupopup.appendChild(menuitem);
-    }
-
-    /**
-     * Creates a simple menu separator element and appends it to the current
-     * menupopup hierarchy.
-     */
-    function createMenuSeparator() {
-      let menuseparator = document.createElement("menuseparator");
-      menupopup.appendChild(menuseparator);
-    }
-  },
-
-  /**
-   * Copy the source url from the currently selected item.
-   */
-  _onCopyUrlCommand: function () {
-    let selected = this.selectedItem && this.selectedItem.attachment;
-    if (!selected) {
-      return;
-    }
-    clipboardHelper.copyString(selected.source.url);
-  },
-
-  /**
-   * Opens selected item source in a new tab.
-   */
-  _onNewTabCommand: function () {
-    let selected = this.selectedItem.attachment;
-    openContentLink(selected.source.url, {
-      relatedToCurrent: true,
-    });
-  },
-
-  /**
-   * Function called each time a breakpoint item is removed.
-   *
-   * @param object aItem
-   *        The corresponding item.
-   */
-  _onBreakpointRemoved: function (aItem) {
-    dumpn("Finalizing breakpoint item: " + aItem.stringify());
-
-    // Destroy the context menu for the breakpoint.
-    let contextMenu = aItem.attachment.popup;
-    document.getElementById(contextMenu.commandsetId).remove();
-    document.getElementById(contextMenu.menupopupId).remove();
-  },
-
-  _onMouseDown: function (e) {
-    this.hideNoResultsTooltip();
-
-    if (!e.metaKey) {
-      return;
-    }
-
-    let editor = this.DebuggerView.editor;
-    let identifier = this._findIdentifier(e.clientX, e.clientY);
-
-    if (!identifier) {
-      return;
-    }
-
-    let foundDefinitions = this._getFunctionDefinitions(identifier);
-
-    if (!foundDefinitions || !foundDefinitions.definitions) {
-      return;
-    }
-
-    this._showFunctionDefinitionResults(identifier, foundDefinitions.definitions, editor);
-  },
-
-  /**
-   * Searches for function definition of a function in a given source file
-   */
-
-  _findDefinition: function (parsedSource, aName) {
-    let functionDefinitions = parsedSource.getNamedFunctionDefinitions(aName);
-
-    let resultList = [];
-
-    if (!functionDefinitions || !functionDefinitions.length || !functionDefinitions[0].length) {
-      return {
-        definitions: resultList
-      };
-    }
-
-    // functionDefinitions is a list with an object full of metadata,
-    // extract the data and use to construct a more useful, less
-    // cluttered, contextual list
-    for (let i = 0; i < functionDefinitions.length; i++) {
-      let functionDefinition = {
-        source: functionDefinitions[i].sourceUrl,
-        startLine: functionDefinitions[i][0].functionLocation.start.line,
-        startColumn: functionDefinitions[i][0].functionLocation.start.column,
-        name: functionDefinitions[i][0].functionName
-      };
-
-      resultList.push(functionDefinition);
-    }
-
-    return {
-      definitions: resultList
-    };
-  },
-
-  /**
-   * Searches for an identifier underneath the specified position in the
-   * source editor.
-   *
-   * @param number x, y
-   *        The left/top coordinates where to look for an identifier.
-   */
-  _findIdentifier: function (x, y) {
-    let parsedSource = SourceUtils.parseSource(this.DebuggerView, this.Parser);
-    let identifierInfo = SourceUtils.findIdentifier(this.DebuggerView.editor, parsedSource, x, y);
-
-    // Not hovering over an identifier
-    if (!identifierInfo) {
-      return;
-    }
-
-    return identifierInfo;
-  },
-
-  /**
-   * The selection listener for the source editor.
-   */
-  _onEditorCursorActivity: function (e) {
-    let editor = this.DebuggerView.editor;
-    let start = editor.getCursor("start").line + 1;
-    let end = editor.getCursor().line + 1;
-    let source = getSelectedSource(this.getState());
-
-    if (source) {
-      let location = { actor: source.actor, line: start };
-      if (getBreakpoint(this.getState(), location) && start == end) {
-        this.highlightBreakpoint(location, { noEditorUpdate: true });
-      } else {
-        this.unhighlightBreakpoint();
-      }
-    }
-  },
-
-  /*
-   * Uses function definition data to perform actions in different
-   * cases of how many locations were found: zero, one, or multiple definitions
-   */
-  _showFunctionDefinitionResults: function (aHoveredFunction, aDefinitionList, aEditor) {
-    let definitions = aDefinitionList;
-    let hoveredFunction = aHoveredFunction;
-
-    // show a popup saying no results were found
-    if (definitions.length == 0) {
-      this._noResultsFoundToolTip.setTextContent({
-        messages: [L10N.getStr("noMatchingStringsText")]
-      });
-
-      this._markedIdentifier = aEditor.markText(
-        { line: hoveredFunction.location.start.line - 1, ch: hoveredFunction.location.start.column },
-        { line: hoveredFunction.location.end.line - 1, ch: hoveredFunction.location.end.column });
-
-      this._noResultsFoundToolTip.show(this._markedIdentifier.anchor);
-
-    } else if (definitions.length == 1) {
-      this.DebuggerView.setEditorLocation(definitions[0].source, definitions[0].startLine);
-    } else {
-      // TODO: multiple definitions found, do something else
-      this.DebuggerView.setEditorLocation(definitions[0].source, definitions[0].startLine);
-    }
-  },
-
-  /**
-   * Hides the tooltip and clear marked text popup.
-   */
-  hideNoResultsTooltip: function () {
-    this._noResultsFoundToolTip.hide();
-    if (this._markedIdentifier) {
-      this._markedIdentifier.clear();
-      this._markedIdentifier = null;
-    }
-  },
-
-  /*
-   * Gets the definition locations from function metadata
-   */
-  _getFunctionDefinitions: function (aIdentifierInfo) {
-    let parsedSource = SourceUtils.parseSource(this.DebuggerView, this.Parser);
-    let definition_info = this._findDefinition(parsedSource, aIdentifierInfo.name);
-
-    // Did not find any definitions for the identifier
-    if (!definition_info) {
-      return;
-    }
-
-    return definition_info;
-  },
-
-  /**
-   * The select listener for the sources container.
-   */
-  _onSourceSelect: function ({ detail: sourceItem }) {
-    if (!sourceItem) {
-      return;
-    }
-
-    const { source } = sourceItem.attachment;
-    this.actions.selectSource(source);
-  },
-
-  renderSourceSelected: function (source) {
-    if (source.url) {
-      this._preferredSourceURL = source.url;
-    }
-    this.updateToolbarButtonsState(source);
-    this._selectItem(this.getItemByValue(source.actor));
-  },
-
-  /**
-   * The click listener for the "stop black boxing" button.
-   */
-  _onStopBlackBoxing: Task.async(function* () {
-    this.actions.blackbox(getSelectedSource(this.getState()), false);
-  }),
-
-  /**
-   * The source editor's contextmenu handler.
-   * - Toggles "Add Conditional Breakpoint" and "Edit Conditional Breakpoint" items
-   */
-  _onEditorContextMenuOpen: function (ev, popup) {
-    let actor = this.selectedValue;
-    let line = this.DebuggerView.editor.getCursor().line + 1;
-    let location = { actor, line };
-
-    let breakpoint = getBreakpoint(this.getState(), location);
-    let addConditionalBreakpointMenuItem = popup.querySelector("#se-dbg-cMenu-addConditionalBreakpoint");
-    let editConditionalBreakpointMenuItem = popup.querySelector("#se-dbg-cMenu-editConditionalBreakpoint");
-
-    if (breakpoint && !!breakpoint.condition) {
-      editConditionalBreakpointMenuItem.removeAttribute("hidden");
-      addConditionalBreakpointMenuItem.setAttribute("hidden", true);
-    }
-    else {
-      addConditionalBreakpointMenuItem.removeAttribute("hidden");
-      editConditionalBreakpointMenuItem.setAttribute("hidden", true);
-    }
-  },
-
-  /**
-   * The click listener for a breakpoint container.
-   */
-  _onBreakpointClick: function (e) {
-    let sourceItem = this.getItemForElement(e.target);
-    let breakpointItem = this.getItemForElement.call(sourceItem, e.target);
-    let attachment = breakpointItem.attachment;
-    let bp = getBreakpoint(this.getState(), attachment);
-    if (bp) {
-      this.highlightBreakpoint(bp.location, {
-        openPopup: bp.condition && e.button == 0
-      });
-    } else {
-      this.highlightBreakpoint(bp.location);
-    }
-  },
-
-  /**
-   * The click listener for a breakpoint checkbox.
-   */
-  _onBreakpointCheckboxClick: function (e) {
-    let sourceItem = this.getItemForElement(e.target);
-    let breakpointItem = this.getItemForElement.call(sourceItem, e.target);
-    let bp = getBreakpoint(this.getState(), breakpointItem.attachment);
-
-    if (bp.disabled) {
-      this.actions.enableBreakpoint(bp.location);
-    }
-    else {
-      this.actions.disableBreakpoint(bp.location);
-    }
-
-    // Don't update the editor location (avoid propagating into _onBreakpointClick).
-    e.preventDefault();
-    e.stopPropagation();
-  },
-
-  /**
-   * The popup showing listener for the breakpoints conditional expression panel.
-   */
-  _onConditionalPopupShowing: function () {
-    this._conditionalPopupVisible = true; // Used in tests.
-  },
-
-  /**
-   * The popup shown listener for the breakpoints conditional expression panel.
-   */
-  _onConditionalPopupShown: function () {
-    this._cbTextbox.focus();
-    this._cbTextbox.select();
-    window.emit(EVENTS.CONDITIONAL_BREAKPOINT_POPUP_SHOWN);
-  },
-
-  /**
-   * The popup hiding listener for the breakpoints conditional expression panel.
-   */
-  _onConditionalPopupHiding: function () {
-    this._conditionalPopupVisible = false; // Used in tests.
-
-    // Check if this is an enabled conditional breakpoint, and if so,
-    // save the current conditional expression.
-    let bp = this._selectedBreakpoint;
-    if (bp) {
-      let condition = this._cbTextbox.value;
-      this.actions.setBreakpointCondition(bp.location, condition);
-    }
-  },
-
-  /**
-   * The popup hidden listener for the breakpoints conditional expression panel.
-   */
-  _onConditionalPopupHidden: function () {
-    this._cbPanel.hidden = true;
-    window.emit(EVENTS.CONDITIONAL_BREAKPOINT_POPUP_HIDDEN);
-  },
-
-  /**
-   * The keypress listener for the breakpoints conditional expression textbox.
-   */
-  _onConditionalTextboxKeyPress: function (e) {
-    if (e.keyCode == KeyCodes.DOM_VK_RETURN) {
-      this._hideConditionalPopup();
-    }
-  },
-
-  /**
-   * Called when the add breakpoint key sequence was pressed.
-   */
-  _onCmdAddBreakpoint: function (e) {
-    let actor = this.selectedValue;
-    let line = (this.DebuggerView.clickedLine ?
-                this.DebuggerView.clickedLine + 1 :
-                this.DebuggerView.editor.getCursor().line + 1);
-    let location = { actor, line };
-    let bp = getBreakpoint(this.getState(), location);
-
-    // If a breakpoint already existed, remove it now.
-    if (bp) {
-      this.actions.removeBreakpoint(bp.location);
-    }
-    // No breakpoint existed at the required location, add one now.
-    else {
-      this.actions.addBreakpoint(location);
-    }
-  },
-
-  /**
-   * Called when the add conditional breakpoint key sequence was pressed.
-   */
-  _onCmdAddConditionalBreakpoint: function (e) {
-    let actor = this.selectedValue;
-    let line = (this.DebuggerView.clickedLine ?
-                this.DebuggerView.clickedLine + 1 :
-                this.DebuggerView.editor.getCursor().line + 1);
-
-    let location = { actor, line };
-    let bp = getBreakpoint(this.getState(), location);
-
-    // If a breakpoint already existed or wasn't a conditional, morph it now.
-    if (bp) {
-      this.highlightBreakpoint(bp.location, { openPopup: true });
-    }
-    // No breakpoint existed at the required location, add one now.
-    else {
-      this.actions.addBreakpoint(location, "");
-    }
-  },
-
-  getOtherBreakpoints: function (location) {
-    const bps = getBreakpoints(this.getState());
-    if (location) {
-      return bps.filter(bp => {
-        return (bp.location.actor !== location.actor ||
-                bp.location.line !== location.line);
-      });
-    }
-    return bps;
-  },
-
-  /**
-   * Function invoked on the "setConditional" menuitem command.
-   *
-   * @param object aLocation
-   *        @see DebuggerController.Breakpoints.addBreakpoint
-   */
-  _onSetConditional: function (aLocation) {
-    // Highlight the breakpoint and show a conditional expression popup.
-    this.highlightBreakpoint(aLocation, { openPopup: true });
-  },
-
-  /**
-   * Function invoked on the "enableSelf" menuitem command.
-   *
-   * @param object aLocation
-   *        @see DebuggerController.Breakpoints.addBreakpoint
-   */
-  _onEnableSelf: function (aLocation) {
-    // Enable the breakpoint, in this container and the controller store.
-    this.actions.enableBreakpoint(aLocation);
-  },
-
-  /**
-   * Function invoked on the "disableSelf" menuitem command.
-   *
-   * @param object aLocation
-   *        @see DebuggerController.Breakpoints.addBreakpoint
-   */
-  _onDisableSelf: function (aLocation) {
-    const bp = getBreakpoint(this.getState(), aLocation);
-    if (!bp.disabled) {
-      this.actions.disableBreakpoint(aLocation);
-    }
-  },
-
-  /**
-   * Function invoked on the "deleteSelf" menuitem command.
-   *
-   * @param object aLocation
-   *        @see DebuggerController.Breakpoints.addBreakpoint
-   */
-  _onDeleteSelf: function (aLocation) {
-    this.actions.removeBreakpoint(aLocation);
-  },
-
-  /**
-   * Function invoked on the "enableOthers" menuitem command.
-   *
-   * @param object aLocation
-   *        @see DebuggerController.Breakpoints.addBreakpoint
-   */
-  _onEnableOthers: function (aLocation) {
-    let other = this.getOtherBreakpoints(aLocation);
-    // TODO(jwl): batch these and interrupt the thread for all of them
-    other.forEach(bp => this._onEnableSelf(bp.location));
-  },
-
-  /**
-   * Function invoked on the "disableOthers" menuitem command.
-   *
-   * @param object aLocation
-   *        @see DebuggerController.Breakpoints.addBreakpoint
-   */
-  _onDisableOthers: function (aLocation) {
-    let other = this.getOtherBreakpoints(aLocation);
-    other.forEach(bp => this._onDisableSelf(bp.location));
-  },
-
-  /**
-   * Function invoked on the "deleteOthers" menuitem command.
-   *
-   * @param object aLocation
-   *        @see DebuggerController.Breakpoints.addBreakpoint
-   */
-  _onDeleteOthers: function (aLocation) {
-    let other = this.getOtherBreakpoints(aLocation);
-    other.forEach(bp => this._onDeleteSelf(bp.location));
-  },
-
-  /**
-   * Function invoked on the "enableAll" menuitem command.
-   */
-  _onEnableAll: function () {
-    this._onEnableOthers(undefined);
-  },
-
-  /**
-   * Function invoked on the "disableAll" menuitem command.
-   */
-  _onDisableAll: function () {
-    this._onDisableOthers(undefined);
-  },
-
-  /**
-   * Function invoked on the "deleteAll" menuitem command.
-   */
-  _onDeleteAll: function () {
-    this._onDeleteOthers(undefined);
-  },
-
-  _commandset: null,
-  _popupset: null,
-  _cmPopup: null,
-  _cbPanel: null,
-  _cbTextbox: null,
-  _selectedBreakpointItem: null,
-  _conditionalPopupVisible: false,
-  _noResultsFoundToolTip: null,
-  _markedIdentifier: null,
-  _selectedBreakpoint: null,
-  _conditionalPopupVisible: false
-});
-
-module.exports = SourcesView;
deleted file mode 100644
--- a/devtools/client/debugger/debugger-controller.js
+++ /dev/null
@@ -1,1311 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* 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/. */
-"use strict";
-
-const DBG_STRINGS_URI = "devtools/client/locales/debugger.properties";
-const NEW_SOURCE_IGNORED_URLS = ["debugger eval code", "XStringBundle"];
-const NEW_SOURCE_DISPLAY_DELAY = 200; // ms
-const FETCH_SOURCE_RESPONSE_DELAY = 200; // ms
-const FRAME_STEP_CLEAR_DELAY = 100; // ms
-const CALL_STACK_PAGE_SIZE = 25; // frames
-
-// The panel's window global is an EventEmitter firing the following events:
-const EVENTS = {
-  // When the debugger's source editor instance finishes loading or unloading.
-  EDITOR_LOADED: "Debugger:EditorLoaded",
-  EDITOR_UNLOADED: "Debugger:EditorUnloaded",
-
-  // When new sources are received from the debugger server.
-  NEW_SOURCE: "Debugger:NewSource",
-  SOURCES_ADDED: "Debugger:SourcesAdded",
-
-  // When a source is shown in the source editor.
-  SOURCE_SHOWN: "Debugger:EditorSourceShown",
-  SOURCE_ERROR_SHOWN: "Debugger:EditorSourceErrorShown",
-
-  // When the editor has shown a source and set the line / column position
-  EDITOR_LOCATION_SET: "Debugger:EditorLocationSet",
-
-  // When scopes, variables, properties and watch expressions are fetched and
-  // displayed in the variables view.
-  FETCHED_SCOPES: "Debugger:FetchedScopes",
-  FETCHED_VARIABLES: "Debugger:FetchedVariables",
-  FETCHED_PROPERTIES: "Debugger:FetchedProperties",
-  FETCHED_BUBBLE_PROPERTIES: "Debugger:FetchedBubbleProperties",
-  FETCHED_WATCH_EXPRESSIONS: "Debugger:FetchedWatchExpressions",
-
-  // When a breakpoint has been added or removed on the debugger server.
-  BREAKPOINT_ADDED: "Debugger:BreakpointAdded",
-  BREAKPOINT_REMOVED: "Debugger:BreakpointRemoved",
-  BREAKPOINT_CLICKED: "Debugger:BreakpointClicked",
-
-  // When a breakpoint has been shown or hidden in the source editor
-  // or the pane.
-  BREAKPOINT_SHOWN_IN_EDITOR: "Debugger:BreakpointShownInEditor",
-  BREAKPOINT_SHOWN_IN_PANE: "Debugger:BreakpointShownInPane",
-  BREAKPOINT_HIDDEN_IN_EDITOR: "Debugger:BreakpointHiddenInEditor",
-  BREAKPOINT_HIDDEN_IN_PANE: "Debugger:BreakpointHiddenInPane",
-
-  // When a conditional breakpoint's popup is shown/hidden.
-  CONDITIONAL_BREAKPOINT_POPUP_SHOWN: "Debugger:ConditionalBreakpointPopupShown",
-  CONDITIONAL_BREAKPOINT_POPUP_HIDDEN: "Debugger:ConditionalBreakpointPopupHidden",
-
-  // When event listeners are fetched or event breakpoints are updated.
-  EVENT_LISTENERS_FETCHED: "Debugger:EventListenersFetched",
-  EVENT_BREAKPOINTS_UPDATED: "Debugger:EventBreakpointsUpdated",
-
-  // When a file search was performed.
-  FILE_SEARCH_MATCH_FOUND: "Debugger:FileSearch:MatchFound",
-  FILE_SEARCH_MATCH_NOT_FOUND: "Debugger:FileSearch:MatchNotFound",
-
-  // When a function search was performed.
-  FUNCTION_SEARCH_MATCH_FOUND: "Debugger:FunctionSearch:MatchFound",
-  FUNCTION_SEARCH_MATCH_NOT_FOUND: "Debugger:FunctionSearch:MatchNotFound",
-
-  // When a global text search was performed.
-  GLOBAL_SEARCH_MATCH_FOUND: "Debugger:GlobalSearch:MatchFound",
-  GLOBAL_SEARCH_MATCH_NOT_FOUND: "Debugger:GlobalSearch:MatchNotFound",
-
-  // After the the StackFrames object has been filled with frames
-  AFTER_FRAMES_REFILLED: "Debugger:AfterFramesRefilled",
-
-  // After the stackframes are cleared and debugger won't pause anymore.
-  AFTER_FRAMES_CLEARED: "Debugger:AfterFramesCleared",
-
-  // When the options popup is showing or hiding.
-  OPTIONS_POPUP_SHOWING: "Debugger:OptionsPopupShowing",
-  OPTIONS_POPUP_HIDDEN: "Debugger:OptionsPopupHidden",
-
-  // When the widgets layout has been changed.
-  LAYOUT_CHANGED: "Debugger:LayoutChanged",
-
-  // When a worker has been selected.
-  WORKER_SELECTED: "Debugger::WorkerSelected"
-};
-
-// Descriptions for what a stack frame represents after the debugger pauses.
-const FRAME_TYPE = {
-  NORMAL: 0,
-  CONDITIONAL_BREAKPOINT_EVAL: 1,
-  WATCH_EXPRESSIONS_EVAL: 2,
-  PUBLIC_CLIENT_EVAL: 3
-};
-
-const { BrowserLoader } = ChromeUtils.import("resource://devtools/client/shared/browser-loader.js", {});
-const { require } = BrowserLoader({
-  baseURI: "resource://devtools/client/debugger/",
-  window,
-});
-const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
-XPCOMUtils.defineConstant(this, "require", require);
-const { SimpleListWidget } = require("resource://devtools/client/shared/widgets/SimpleListWidget.jsm");
-const { BreadcrumbsWidget } = require("resource://devtools/client/shared/widgets/BreadcrumbsWidget.jsm");
-const { SideMenuWidget } = require("resource://devtools/client/shared/widgets/SideMenuWidget.jsm");
-const { VariablesView } = require("resource://devtools/client/shared/widgets/VariablesView.jsm");
-const { VariablesViewController, StackFrameUtils } = require("resource://devtools/client/shared/widgets/VariablesViewController.jsm");
-const EventEmitter = require("devtools/shared/event-emitter");
-const { extend } = require("devtools/shared/extend");
-const { gDevTools } = require("devtools/client/framework/devtools");
-const { ViewHelpers, WidgetMethods, setNamedTimeout,
-        clearNamedTimeout } = require("devtools/client/shared/widgets/view-helpers");
-
-// Use privileged promise in panel documents to prevent having them to freeze
-// during toolbox destruction. See bug 1402779.
-const Promise = require("Promise");
-
-// React
-const React = require("devtools/client/shared/vendor/react");
-const ReactDOM = require("devtools/client/shared/vendor/react-dom");
-const { Provider } = require("devtools/client/shared/vendor/react-redux");
-
-// Used to create the Redux store
-const createStore = require("devtools/client/shared/redux/create-store")({
-  getTargetClient: () => DebuggerController.client,
-  log: false
-});
-const {
-  makeStateBroadcaster,
-  enhanceStoreWithBroadcaster,
-  combineBroadcastingReducers
-} = require("devtools/client/shared/redux/non-react-subscriber");
-const { bindActionCreators } = require("devtools/client/shared/vendor/redux");
-const reducers = require("./content/reducers/index");
-const { onReducerEvents } = require("./content/utils");
-
-const waitUntilService = require("devtools/client/shared/redux/middleware/wait-service");
-var services = {
-  WAIT_UNTIL: waitUntilService.NAME
-};
-
-var Services = require("Services");
-var {TargetFactory} = require("devtools/client/framework/target");
-var {Toolbox} = require("devtools/client/framework/toolbox");
-var DevToolsUtils = require("devtools/shared/DevToolsUtils");
-var promise = require("devtools/shared/deprecated-sync-thenables");
-var Editor = require("devtools/client/sourceeditor/editor");
-var DebuggerEditor = require("devtools/client/sourceeditor/debugger");
-var Tooltip = require("./content/tooltip/Tooltip");
-var FastListWidget = require("devtools/client/shared/widgets/FastListWidget");
-var {LocalizationHelper, ELLIPSIS} = require("devtools/shared/l10n");
-var {PrefsHelper} = require("devtools/client/shared/prefs");
-var {Task} = require("devtools/shared/task");
-
-XPCOMUtils.defineConstant(this, "EVENTS", EVENTS);
-
-ChromeUtils.defineModuleGetter(this, "Parser",
-  "resource://devtools/shared/Parser.jsm");
-
-ChromeUtils.defineModuleGetter(this, "ShortcutUtils",
-  "resource://gre/modules/ShortcutUtils.jsm");
-
-XPCOMUtils.defineLazyServiceGetter(this, "clipboardHelper",
-  "@mozilla.org/widget/clipboardhelper;1", "nsIClipboardHelper");
-
-Object.defineProperty(this, "NetworkHelper", {
-  get: function () {
-    return require("devtools/shared/webconsole/network-helper");
-  },
-  configurable: true,
-  enumerable: true
-});
-
-/**
- * Localization convenience methods.
- */
-var L10N = new LocalizationHelper(DBG_STRINGS_URI);
-
-/**
- * Object defining the debugger controller components.
- */
-var DebuggerController = {
-  /**
-   * Initializes the debugger controller.
-   */
-  initialize: function () {
-    dumpn("Initializing the DebuggerController");
-
-    this.startupDebugger = this.startupDebugger.bind(this);
-    this.shutdownDebugger = this.shutdownDebugger.bind(this);
-    this._onNavigate = this._onNavigate.bind(this);
-    this._onWillNavigate = this._onWillNavigate.bind(this);
-    this._onTabDetached = this._onTabDetached.bind(this);
-
-    const broadcaster = makeStateBroadcaster(() => !!this.activeThread);
-    const reducer = combineBroadcastingReducers(
-      reducers,
-      broadcaster.emitChange
-    );
-    // TODO: Bug 1228867, clean this up and probably abstract it out
-    // better.
-    //
-    // We only want to process async event that are appropriate for
-    // this page. The devtools are open across page reloads, so async
-    // requests from the last page might bleed through if reloading
-    // fast enough. We check to make sure the async action is part of
-    // a current request, and ignore it if not.
-    let store = createStore((state, action) => {
-      if (action.seqId &&
-         (action.status === "done" || action.status === "error") &&
-         state && !state.asyncRequests.includes(action.seqId)) {
-        return state;
-      }
-      return reducer(state, action);
-    });
-    store = enhanceStoreWithBroadcaster(store, broadcaster);
-
-    // This controller right now acts as the store that's globally
-    // available, so just copy the Redux API onto it.
-    Object.keys(store).forEach(name => {
-      this[name] = store[name];
-    });
-  },
-
-  /**
-   * Initializes the view.
-   *
-   * @return object
-   *         A promise that is resolved when the debugger finishes startup.
-   */
-  startupDebugger: Task.async(function* () {
-    if (this._startup) {
-      return;
-    }
-
-    yield DebuggerView.initialize(this._target.isWorkerTarget);
-    this._startup = true;
-  }),
-
-  /**
-   * Destroys the view and disconnects the debugger client from the server.
-   *
-   * @return object
-   *         A promise that is resolved when the debugger finishes shutdown.
-   */
-  shutdownDebugger: Task.async(function* () {
-    if (this._shutdown) {
-      return;
-    }
-
-    DebuggerView.destroy();
-    this.StackFrames.disconnect();
-    this.ThreadState.disconnect();
-    if (this._target.isBrowsingContext) {
-      this.Workers.disconnect();
-    }
-
-    this.disconnect();
-
-    this._shutdown = true;
-  }),
-
-  /**
-   * Initiates remote debugging based on the current target, wiring event
-   * handlers as necessary.
-   *
-   * @return object
-   *         A promise that is resolved when the debugger finishes connecting.
-   */
-  connect: Task.async(function* () {
-    let target = this._target;
-
-    let { client } = target;
-    target.on("close", this._onTabDetached);
-    target.on("navigate", this._onNavigate);
-    target.on("will-navigate", this._onWillNavigate);
-    this.client = client;
-    this.activeThread = this._toolbox.threadClient;
-
-    let wasmBinarySource = !!this.client.mainRoot.traits.wasmBinarySource;
-
-    // Disable asm.js so that we can set breakpoints and other things
-    // on asm.js scripts. For WebAssembly modules allow using of binary
-    // source if supported.
-    yield this.reconfigureThread({ observeAsmJS: true, wasmBinarySource, });
-    yield this.connectThread();
-
-    // We need to call this to sync the state of the resume
-    // button in the toolbar with the state of the thread.
-    this.ThreadState._update();
-
-    this._hideUnsupportedFeatures();
-  }),
-
-  connectThread: function () {
-    const { newSource, fetchEventListeners } = bindActionCreators(actions, this.dispatch);
-
-    this.activeThread.addListener("newSource", (event, packet) => {
-      newSource(packet.source);
-
-      // Make sure the events listeners are up to date.
-      if (DebuggerView.instrumentsPaneTab == "events-tab") {
-        fetchEventListeners();
-      }
-    });
-
-    if (this._target.isBrowsingContext) {
-      this.Workers.connect();
-    }
-    this.ThreadState.connect();
-    this.StackFrames.connect();
-
-    // Load all of the sources. Note that the server will actually
-    // emit individual `newSource` notifications, which trigger
-    // separate actions, so this won't do anything other than force
-    // the server to traverse sources.
-    this.dispatch(actions.loadSources()).then(() => {
-      // If the engine is already paused, update the UI to represent the
-      // paused state
-      if (this.activeThread) {
-        const pausedPacket = this.activeThread.getLastPausePacket();
-        DebuggerView.Toolbar.toggleResumeButtonState(
-          this.activeThread.state,
-          !!pausedPacket
-        );
-        if (pausedPacket) {
-          this.StackFrames._onPaused("paused", pausedPacket);
-        }
-      }
-    });
-  },
-
-  /**
-   * Disconnects the debugger client and removes event handlers as necessary.
-   */
-  disconnect: function () {
-    // Return early if the client didn't even have a chance to instantiate.
-    if (!this.client) {
-      return;
-    }
-
-    this.activeThread.removeListener("newSource");
-    this.activeThread.removeListener("blackboxchange");
-
-    this._connected = false;
-    this.client = null;
-    this.activeThread = null;
-  },
-
-  _hideUnsupportedFeatures: function () {
-    if (this.client.mainRoot.traits.noPrettyPrinting) {
-      DebuggerView.Sources.hidePrettyPrinting();
-    }
-
-    if (this.client.mainRoot.traits.noBlackBoxing) {
-      DebuggerView.Sources.hideBlackBoxing();
-    }
-  },
-
-  _onWillNavigate: function (opts = {}) {
-    // Reset UI.
-    DebuggerView.handleTabNavigation();
-    if (!opts.noUnload) {
-      this.dispatch(actions.unload());
-    }
-
-    // Discard all the cached parsed sources *before* the target
-    // starts navigating. Sources may be fetched during navigation, in
-    // which case we don't want to hang on to the old source contents.
-    DebuggerController.Parser.clearCache();
-    SourceUtils.clearCache();
-
-    // Prevent performing any actions that were scheduled before
-    // navigation.
-    clearNamedTimeout("new-source");
-    clearNamedTimeout("event-breakpoints-update");
-    clearNamedTimeout("event-listeners-fetch");
-  },
-
-  _onNavigate: function () {
-    this.ThreadState.handleTabNavigation();
-    this.StackFrames.handleTabNavigation();
-  },
-
-  /**
-   * Called when the debugged tab is closed.
-   */
-  _onTabDetached: function () {
-    this.shutdownDebugger();
-  },
-
-  /**
-   * Warn if resuming execution produced a wrongOrder error.
-   */
-  _ensureResumptionOrder: function (aResponse) {
-    if (aResponse.error == "wrongOrder") {
-      DebuggerView.Toolbar.showResumeWarning(aResponse.lastPausedUrl);
-    }
-  },
-
-  /**
-   * Detach and reattach to the thread actor with useSourceMaps true, blow
-   * away old sources and get them again.
-   */
-  reconfigureThread: function (opts) {
-    const deferred = promise.defer();
-    this.activeThread.reconfigure(
-      opts,
-      aResponse => {
-        if (aResponse.error) {
-          deferred.reject(aResponse.error);
-          return;
-        }
-
-        if (("useSourceMaps" in opts) || ("autoBlackBox" in opts)) {
-          // Reset the view and fetch all the sources again.
-          DebuggerView.handleTabNavigation();
-          this.dispatch(actions.unload());
-          this.dispatch(actions.loadSources());
-
-          // Update the stack frame list.
-          if (this.activeThread.paused) {
-            this.activeThread._clearFrames();
-            this.activeThread.fillFrames(CALL_STACK_PAGE_SIZE);
-          }
-        }
-
-        deferred.resolve();
-      }
-    );
-    return deferred.promise;
-  },
-
-  waitForSourcesLoaded: function () {
-    const deferred = promise.defer();
-    this.dispatch({
-      type: services.WAIT_UNTIL,
-      predicate: action => (action.type === constants.LOAD_SOURCES &&
-                            action.status === "done"),
-      run: deferred.resolve
-    });
-    return deferred.promise;
-  },
-
-  waitForSourceShown: function (name) {
-    const deferred = promise.defer();
-    window.on(EVENTS.SOURCE_SHOWN, function onShown(source) {
-      if (source.url.includes(name)) {
-        window.off(EVENTS.SOURCE_SHOWN, onShown);
-        deferred.resolve();
-      }
-    });
-    return deferred.promise;
-  },
-
-  _startup: false,
-  _shutdown: false,
-  _connected: false,
-  client: null,
-  activeThread: null
-};
-
-function Workers() {
-  this._workerForms = Object.create(null);
-  this._onWorkerListChanged = this._onWorkerListChanged.bind(this);
-  this._onWorkerSelect = this._onWorkerSelect.bind(this);
-}
-
-Workers.prototype = {
-  get _targetFront() {
-    return DebuggerController._target.activeTab;
-  },
-
-  connect: function () {
-    if (!Prefs.workersEnabled) {
-      return;
-    }
-
-    this._updateWorkerList();
-
-    // `_targetFront` can be BrowsingContextTargetFront/WorkerTargetFront (protocol.js
-    // front) or DebuggerClient (old fashion client)
-    if (typeof(this._targetFront.on) == "function") {
-      this._targetFront.on("workerListChanged", this._onWorkerListChanged);
-    } else {
-      this._targetFront.addListener("workerListChanged", this._onWorkerListChanged);
-    }
-  },
-
-  disconnect: function () {
-    if (typeof(this._targetFront.on) == "function") {
-      this._targetFront.off("workerListChanged", this._onWorkerListChanged);
-    } else {
-      this._targetFront.removeListener("workerListChanged", this._onWorkerListChanged);
-    }
-  },
-
-  _updateWorkerList: function () {
-    if (!this._targetFront.listWorkers) {
-      return;
-    }
-
-    this._targetFront.listWorkers().then((response) => {
-      let workerForms = Object.create(null);
-      for (let worker of response.workers) {
-        workerForms[worker.actor] = worker;
-      }
-
-      for (let workerTargetActor in this._workerForms) {
-        if (!(workerTargetActor in workerForms)) {
-          DebuggerView.Workers.removeWorker(this._workerForms[workerTargetActor]);
-          delete this._workerForms[workerTargetActor];
-        }
-      }
-
-      for (let workerTargetActor in workerForms) {
-        if (!(workerTargetActor in this._workerForms)) {
-          let workerForm = workerForms[workerTargetActor];
-          this._workerForms[workerTargetActor] = workerForm;
-          DebuggerView.Workers.addWorker(workerForm);
-        }
-      }
-    });
-  },
-
-  _onWorkerListChanged: function () {
-    this._updateWorkerList();
-  },
-
-  _onWorkerSelect: function (workerForm) {
-    DebuggerController.client.attachWorker(workerForm.actor).then(([response, workerTargetFront]) => {
-      let toolbox = gDevTools.showToolbox(TargetFactory.forWorker(workerTargetFront),
-                                          "jsdebugger", Toolbox.HostType.WINDOW);
-      window.emit(EVENTS.WORKER_SELECTED, toolbox);
-    });
-  }
-};
-
-/**
- * ThreadState keeps the UI up to date with the state of the
- * thread (paused/attached/etc.).
- */
-function ThreadState() {
-  this._update = this._update.bind(this);
-  this.interruptedByResumeButton = false;
-}
-
-ThreadState.prototype = {
-  get activeThread() {
-    return DebuggerController.activeThread;
-  },
-
-  /**
-   * Connect to the current thread client.
-   */
-  connect: function () {
-    dumpn("ThreadState is connecting...");
-    this.activeThread.addListener("paused", this._update);
-    this.activeThread.addListener("resumed", this._update);
-  },
-
-  /**
-   * Disconnect from the client.
-   */
-  disconnect: function () {
-    if (!this.activeThread) {
-      return;
-    }
-    dumpn("ThreadState is disconnecting...");
-    this.activeThread.removeListener("paused", this._update);
-    this.activeThread.removeListener("resumed", this._update);
-  },
-
-  /**
-   * Handles any initialization on a tab navigation event issued by the client.
-   */
-  handleTabNavigation: function () {
-    if (!this.activeThread) {
-      return;
-    }
-    dumpn("Handling tab navigation in the ThreadState");
-    this._update();
-  },
-
-  /**
-   * Update the UI after a thread state change.
-   */
-  _update: function (aEvent, aPacket) {
-    if (aEvent == "paused") {
-      if (aPacket.why.type == "interrupted" &&
-          this.interruptedByResumeButton) {
-        // Interrupt requests suppressed by default, but if this is an
-        // explicit interrupt by the pause button we want to emit it.
-        gTarget.emit("thread-paused", aPacket);
-      } else if (aPacket.why.type == "breakpointConditionThrown" && aPacket.why.message) {
-        let where = aPacket.frame.where;
-        let aLocation = {
-          line: where.line,
-          column: where.column,
-          actor: where.source ? where.source.actor : null
-        };
-        DebuggerView.Sources.showBreakpointConditionThrownMessage(
-          aLocation,
-          aPacket.why.message
-        );
-      }
-    }
-
-    this.interruptedByResumeButton = false;
-    DebuggerView.Toolbar.toggleResumeButtonState(
-      this.activeThread.state,
-      aPacket ? aPacket.frame : false
-    );
-  }
-};
-
-/**
- * Keeps the stack frame list up-to-date, using the thread client's
- * stack frame cache.
- */
-function StackFrames() {
-  this._onPaused = this._onPaused.bind(this);
-  this._onResumed = this._onResumed.bind(this);
-  this._onFrames = this._onFrames.bind(this);
-  this._onFramesCleared = this._onFramesCleared.bind(this);
-  this._onBlackBoxChange = this._onBlackBoxChange.bind(this);
-  this._onPrettyPrintChange = this._onPrettyPrintChange.bind(this);
-  this._afterFramesCleared = this._afterFramesCleared.bind(this);
-  this.evaluate = this.evaluate.bind(this);
-}
-
-StackFrames.prototype = {
-  get activeThread() {
-    return DebuggerController.activeThread;
-  },
-
-  currentFrameDepth: -1,
-  _currentFrameDescription: FRAME_TYPE.NORMAL,
-  _syncedWatchExpressions: null,
-  _currentWatchExpressions: null,
-  _currentBreakpointLocation: null,
-  _currentEvaluation: null,
-  _currentException: null,
-  _currentReturnedValue: null,
-
-  /**
-   * Connect to the current thread client.
-   */
-  connect: function () {
-    dumpn("StackFrames is connecting...");
-    this.activeThread.addListener("paused", this._onPaused);
-    this.activeThread.addListener("resumed", this._onResumed);
-    this.activeThread.addListener("framesadded", this._onFrames);
-    this.activeThread.addListener("framescleared", this._onFramesCleared);
-    this.activeThread.addListener("blackboxchange", this._onBlackBoxChange);
-    this.activeThread.addListener("prettyprintchange", this._onPrettyPrintChange);
-    this.handleTabNavigation();
-  },
-
-  /**
-   * Disconnect from the client.
-   */
-  disconnect: function () {
-    if (!this.activeThread) {
-      return;
-    }
-    dumpn("StackFrames is disconnecting...");
-    this.activeThread.removeListener("paused", this._onPaused);
-    this.activeThread.removeListener("resumed", this._onResumed);
-    this.activeThread.removeListener("framesadded", this._onFrames);
-    this.activeThread.removeListener("framescleared", this._onFramesCleared);
-    this.activeThread.removeListener("blackboxchange", this._onBlackBoxChange);
-    this.activeThread.removeListener("prettyprintchange", this._onPrettyPrintChange);
-    clearNamedTimeout("frames-cleared");
-  },
-
-  /**
-   * Handles any initialization on a tab navigation event issued by the client.
-   */
-  handleTabNavigation: function () {
-    dumpn("Handling tab navigation in the StackFrames");
-    // Nothing to do here yet.
-  },
-
-  /**
-   * Handler for the thread client's paused notification.
-   *
-   * @param string aEvent
-   *        The name of the notification ("paused" in this case).
-   * @param object aPacket
-   *        The response packet.
-   */
-  _onPaused: function (aEvent, aPacket) {
-    switch (aPacket.why.type) {
-      // If paused by a breakpoint, store the breakpoint location.
-      case "breakpoint":
-        this._currentBreakpointLocation = aPacket.frame.where;
-        break;
-      case "breakpointConditionThrown":
-        this._currentBreakpointLocation = aPacket.frame.where;
-        this._conditionThrowMessage = aPacket.why.message;
-        break;
-      // If paused by a client evaluation, store the evaluated value.
-      case "clientEvaluated":
-        this._currentEvaluation = aPacket.why.frameFinished;
-        break;
-      // If paused by an exception, store the exception value.
-      case "exception":
-        this._currentException = aPacket.why.exception;
-        break;
-      // If paused while stepping out of a frame, store the returned value or
-      // thrown exception.
-      case "resumeLimit":
-        if (!aPacket.why.frameFinished) {
-          break;
-        } else if (aPacket.why.frameFinished.throw) {
-          this._currentException = aPacket.why.frameFinished.throw;
-        } else if (aPacket.why.frameFinished.return) {
-          this._currentReturnedValue = aPacket.why.frameFinished.return;
-        }
-        break;
-      // If paused by an explicit interrupt, which are generated by the slow
-      // script dialog and internal events such as setting breakpoints, ignore
-      // the event to avoid UI flicker.
-      case "interrupted":
-        if (!aPacket.why.onNext) {
-          return;
-        }
-        break;
-    }
-
-    this.activeThread.fillFrames(CALL_STACK_PAGE_SIZE);
-    // Focus the editor, but don't steal focus from the split console.
-    if (!DebuggerController._toolbox.isSplitConsoleFocused()) {
-      DebuggerView.editor.focus();
-    }
-  },
-
-  /**
-   * Handler for the thread client's resumed notification.
-   */
-  _onResumed: function () {
-    // Prepare the watch expression evaluation string for the next pause.
-    if (this._currentFrameDescription != FRAME_TYPE.WATCH_EXPRESSIONS_EVAL) {
-      this._currentWatchExpressions = this._syncedWatchExpressions;
-    }
-  },
-
-  /**
-   * Handler for the thread client's framesadded notification.
-   */
-  _onFrames: Task.async(function* () {
-    // Ignore useless notifications.
-    if (!this.activeThread || !this.activeThread.cachedFrames.length) {
-      return;
-    }
-    if (this._currentFrameDescription != FRAME_TYPE.NORMAL &&
-        this._currentFrameDescription != FRAME_TYPE.PUBLIC_CLIENT_EVAL) {
-      return;
-    }
-
-    // TODO: remove all of this deprecated code: Bug 990137.
-    yield this._handleConditionalBreakpoint();
-
-    // TODO: handle all of this server-side: Bug 832470, comment 14.
-    yield this._handleWatchExpressions();
-
-    // Make sure the debugger view panes are visible, then refill the frames.
-    DebuggerView.showInstrumentsPane();
-    this._refillFrames();
-
-    // No additional processing is necessary for this stack frame.
-    if (this._currentFrameDescription != FRAME_TYPE.NORMAL) {
-      this._currentFrameDescription = FRAME_TYPE.NORMAL;
-    }
-  }),
-
-  /**
-   * Fill the StackFrames view with the frames we have in the cache, compressing
-   * frames which have black boxed sources into single frames.
-   */
-  _refillFrames: function () {
-    // Make sure all the previous stackframes are removed before re-adding them.
-    DebuggerView.StackFrames.empty();
-
-    for (let frame of this.activeThread.cachedFrames) {
-      let { depth, source, where: { line, column } } = frame;
-
-      let isBlackBoxed = source ? this.activeThread.source(source).isBlackBoxed : false;
-      DebuggerView.StackFrames.addFrame(frame, line, column, depth, isBlackBoxed);
-    }
-
-    DebuggerView.StackFrames.selectedDepth = Math.max(this.currentFrameDepth, 0);
-    DebuggerView.StackFrames.dirty = this.activeThread.moreFrames;
-
-    DebuggerView.StackFrames.addCopyContextMenu();
-
-    window.emit(EVENTS.AFTER_FRAMES_REFILLED);
-  },
-
-  /**
-   * Handler for the thread client's framescleared notification.
-   */
-  _onFramesCleared: function () {
-    switch (this._currentFrameDescription) {
-      case FRAME_TYPE.NORMAL:
-        this._currentEvaluation = null;
-        this._currentException = null;
-        this._currentReturnedValue = null;
-        break;
-      case FRAME_TYPE.CONDITIONAL_BREAKPOINT_EVAL:
-        this._currentBreakpointLocation = null;
-        break;
-      case FRAME_TYPE.WATCH_EXPRESSIONS_EVAL:
-        this._currentWatchExpressions = null;
-        break;
-    }
-
-    // After each frame step (in, over, out), framescleared is fired, which
-    // forces the UI to be emptied and rebuilt on framesadded. Most of the times
-    // this is not necessary, and will result in a brief redraw flicker.
-    // To avoid it, invalidate the UI only after a short time if necessary.
-    setNamedTimeout("frames-cleared", FRAME_STEP_CLEAR_DELAY, this._afterFramesCleared);
-  },
-
-  /**
-   * Handler for the debugger's blackboxchange notification.
-   */
-  _onBlackBoxChange: function () {
-    if (this.activeThread.state == "paused") {
-      // Hack to avoid selecting the topmost frame after blackboxing a source.
-      this.currentFrameDepth = NaN;
-      this._refillFrames();
-    }
-  },
-
-  /**
-   * Handler for the debugger's prettyprintchange notification.
-   */
-  _onPrettyPrintChange: function () {
-    if (this.activeThread.state != "paused") {
-      return;
-    }
-    // Makes sure the selected source remains selected
-    // after the fillFrames is called.
-    const source = DebuggerView.Sources.selectedValue;
-
-    this.activeThread.fillFrames(CALL_STACK_PAGE_SIZE, () => {
-      DebuggerView.Sources.selectedValue = source;
-    });
-  },
-
-  /**
-   * Called soon after the thread client's framescleared notification.
-   */
-  _afterFramesCleared: function () {
-    // Ignore useless notifications.
-    if (this.activeThread.cachedFrames.length) {
-      return;
-    }
-    DebuggerView.editor.clearDebugLocation();
-    DebuggerView.StackFrames.empty();
-    DebuggerView.Sources.unhighlightBreakpoint();
-    DebuggerView.WatchExpressions.toggleContents(true);
-    DebuggerView.Variables.empty(0);
-
-    window.emit(EVENTS.AFTER_FRAMES_CLEARED);
-  },
-
-  /**
-   * Marks the stack frame at the specified depth as selected and updates the
-   * properties view with the stack frame's data.
-   *
-   * @param number aDepth
-   *        The depth of the frame in the stack.
-   */
-  selectFrame: function (aDepth) {
-    // Make sure the frame at the specified depth exists first.
-    let frame = this.activeThread.cachedFrames[this.currentFrameDepth = aDepth];
-    if (!frame) {
-      return;
-    }
-
-    // Check if the frame does not represent the evaluation of debuggee code.
-    let { environment, where, source } = frame;
-    if (!environment) {
-      return;
-    }
-
-    // Don't change the editor's location if the execution was paused by a
-    // public client evaluation. This is useful for adding overlays on
-    // top of the editor, like a variable inspection popup.
-    let isClientEval = this._currentFrameDescription == FRAME_TYPE.PUBLIC_CLIENT_EVAL;
-    let isPopupShown = DebuggerView.VariableBubble.contentsShown();
-    if (!isClientEval && !isPopupShown) {
-      // Move the editor's caret to the proper url and line.
-      DebuggerView.setEditorLocation(source.actor, where.line);
-    } else {
-      // Highlight the line where the execution is paused in the editor.
-      DebuggerView.setEditorLocation(source.actor, where.line, { noCaret: true });
-    }
-
-    // Highlight the breakpoint at the line and column if it exists.
-    DebuggerView.Sources.highlightBreakpointAtCursor();
-
-    // Don't display the watch expressions textbox inputs in the pane.
-    DebuggerView.WatchExpressions.toggleContents(false);
-
-    // Start recording any added variables or properties in any scope and
-    // clear existing scopes to create each one dynamically.
-    DebuggerView.Variables.empty();
-
-    // If watch expressions evaluation results are available, create a scope
-    // to contain all the values.
-    if (this._syncedWatchExpressions && aDepth == 0) {
-      let label = L10N.getStr("watchExpressionsScopeLabel");
-      let scope = DebuggerView.Variables.addScope(label,
-        "variables-view-watch-expressions");
-
-      // Customize the scope for holding watch expressions evaluations.
-      scope.descriptorTooltip = false;
-      scope.contextMenuId = "debuggerWatchExpressionsContextMenu";
-      scope.separatorStr = L10N.getStr("watchExpressionsSeparatorLabel2");
-      scope.switch = DebuggerView.WatchExpressions.switchExpression;
-      scope.delete = DebuggerView.WatchExpressions.deleteExpression;
-
-      // The evaluation hasn't thrown, so fetch and add the returned results.
-      this._fetchWatchExpressions(scope, this._currentEvaluation.return);
-
-      // The watch expressions scope is always automatically expanded.
-      scope.expand();
-    }
-
-    do {
-      // Create a scope to contain all the inspected variables in the
-      // current environment.
-      let label = StackFrameUtils.getScopeLabel(environment);
-      let scope = DebuggerView.Variables.addScope(label);
-      let innermost = environment == frame.environment;
-
-      // Handle special additions to the innermost scope.
-      if (innermost) {
-        this._insertScopeFrameReferences(scope, frame);
-      }
-
-      // Handle the expansion of the scope, lazily populating it with the
-      // variables in the current environment.
-      DebuggerView.Variables.controller.addExpander(scope, environment);
-
-      // The innermost scope is always automatically expanded, because it
-      // contains the variables in the current stack frame which are likely to
-      // be inspected. The previously expanded scopes are also reexpanded here.
-      if (innermost || DebuggerView.Variables.wasExpanded(scope)) {
-        scope.expand();
-      }
-    } while ((environment = environment.parent));
-
-    // Signal that scope environments have been shown.
-    window.emit(EVENTS.FETCHED_SCOPES);
-  },
-
-  /**
-   * Loads more stack frames from the debugger server cache.
-   */
-  addMoreFrames: function () {
-    this.activeThread.fillFrames(
-      this.activeThread.cachedFrames.length + CALL_STACK_PAGE_SIZE);
-  },
-
-  /**
-   * Evaluate an expression in the context of the selected frame.
-   *
-   * @param string expression
-   *        The expression to evaluate.
-   * @param object options [optional]
-   *        Additional options for this client evaluation:
-   *          - depth: the frame depth used for evaluation, 0 being the topmost.
-   *          - meta: some meta-description for what this evaluation represents.
-   * @return object
-   *         A promise that is resolved when the evaluation finishes,
-   *         or rejected if there was no stack frame available or some
-   *         other error occurred.
-   */
-  evaluate: async function (expression, options = {}) {
-    let depth = "depth" in options
-      ? options.depth
-      : this.currentFrameDepth;
-    let frame = this.activeThread.cachedFrames[depth];
-    if (frame == null) {
-      throw new Error("No stack frame available.");
-    }
-
-    const onThreadPaused = this.activeThread.addOneTimeListener("paused");
-
-    let meta = "meta" in options
-      ? options.meta
-      : FRAME_TYPE.PUBLIC_CLIENT_EVAL;
-    this._currentFrameDescription = meta;
-    this.activeThread.eval(frame.actor, expression);
-
-    const packet = await onThreadPaused;
-
-    let { type, frameFinished } = packet.why;
-    if (type !== "clientEvaluated") {
-      throw new Error("Active thread paused unexpectedly.");
-    }
-
-    return frameFinished;
-  },
-
-  /**
-   * Add nodes for special frame references in the innermost scope.
-   *
-   * @param Scope aScope
-   *        The scope where the references will be placed into.
-   * @param object aFrame
-   *        The frame to get some references from.
-   */
-  _insertScopeFrameReferences: function (aScope, aFrame) {
-    // Add any thrown exception.
-    if (this._currentException) {
-      let excRef = aScope.addItem("<exception>", { value: this._currentException },
-                                  { internalItem: true });
-      DebuggerView.Variables.controller.addExpander(excRef, this._currentException);
-    }
-    // Add any returned value.
-    if (this._currentReturnedValue) {
-      let retRef = aScope.addItem("<return>",
-                                  { value: this._currentReturnedValue },
-                                  { internalItem: true });
-      DebuggerView.Variables.controller.addExpander(retRef, this._currentReturnedValue);
-    }
-    // Add "this".
-    if (aFrame.this) {
-      let thisRef = aScope.addItem("this", { value: aFrame.this });
-      DebuggerView.Variables.controller.addExpander(thisRef, aFrame.this);
-    }
-  },
-
-  /**
-   * Handles conditional breakpoints when the debugger pauses and the
-   * stackframes are received.
-   *
-   * We moved conditional breakpoint handling to the server, but
-   * need to support it in the client for a while until most of the
-   * server code in production is updated with it.
-   * TODO: remove all of this deprecated code: Bug 990137.
-   *
-   * @return object
-   *         A promise that is resolved after a potential breakpoint's
-   *         conditional expression is evaluated. If there's no breakpoint
-   *         where the debugger is paused, the promise is resolved immediately.
-   */
-  _handleConditionalBreakpoint: Task.async(function* () {
-    if (gClient.mainRoot.traits.conditionalBreakpoints) {
-      return;
-    }
-    let breakLocation = this._currentBreakpointLocation;
-    if (!breakLocation) {
-      return;
-    }
-
-    let bp = queries.getBreakpoint(DebuggerController.getState(), {
-      actor: breakLocation.source.actor,
-      line: breakLocation.line
-    });
-    let conditionalExpression = bp.condition;
-    if (!conditionalExpression) {
-      return;
-    }
-
-    // Evaluating the current breakpoint's conditional expression will
-    // cause the stack frames to be cleared and active thread to pause,
-    // sending a 'clientEvaluated' packed and adding the frames again.
-    let evaluationOptions = { depth: 0, meta: FRAME_TYPE.CONDITIONAL_BREAKPOINT_EVAL };
-    yield this.evaluate(conditionalExpression, evaluationOptions);
-    this._currentFrameDescription = FRAME_TYPE.NORMAL;
-
-    // If the breakpoint's conditional expression evaluation is falsy
-    // and there is no exception, automatically resume execution.
-    if (!this._currentEvaluation.throw &&
-        VariablesView.isFalsy({ value: this._currentEvaluation.return })) {
-      this.activeThread.resume(DebuggerController._ensureResumptionOrder);
-    }
-  }),
-
-  /**
-   * Handles watch expressions when the debugger pauses and the stackframes
-   * are received.
-   *
-   * @return object
-   *         A promise that is resolved after the potential watch expressions
-   *         are evaluated. If there are no watch expressions where the debugger
-   *         is paused, the promise is resolved immediately.
-   */
-  _handleWatchExpressions: Task.async(function* () {
-    // Ignore useless notifications.
-    if (!this.activeThread || !this.activeThread.cachedFrames.length) {
-      return;
-    }
-
-    let watchExpressions = this._currentWatchExpressions;
-    if (!watchExpressions) {
-      return;
-    }
-
-    // Evaluation causes the stack frames to be cleared and active thread to
-    // pause, sending a 'clientEvaluated' packet and adding the frames again.
-    let evaluationOptions = { depth: 0, meta: FRAME_TYPE.WATCH_EXPRESSIONS_EVAL };
-    yield this.evaluate(watchExpressions, evaluationOptions);
-    this._currentFrameDescription = FRAME_TYPE.NORMAL;
-
-    // If an error was thrown during the evaluation of the watch expressions
-    // or the evaluation was terminated from the slow script dialog, then at
-    // least one expression evaluation could not be performed. So remove the
-    // most recent watch expression and try again.
-    if (this._currentEvaluation.throw || this._currentEvaluation.terminated) {
-      DebuggerView.WatchExpressions.removeAt(0);
-      yield DebuggerController.StackFrames.syncWatchExpressions();
-    }
-  }),
-
-  /**
-   * Adds the watch expressions evaluation results to a scope in the view.
-   *
-   * @param Scope aScope
-   *        The scope where the watch expressions will be placed into.
-   * @param object aExp
-   *        The grip of the evaluation results.
-   */
-  _fetchWatchExpressions: function (aScope, aExp) {
-    // Fetch the expressions only once.
-    if (aScope._fetched) {
-      return;
-    }
-    aScope._fetched = true;
-
-    // Add nodes for every watch expression in scope.
-    this.activeThread.pauseGrip(aExp).getPrototypeAndProperties(aResponse => {
-      let ownProperties = aResponse.ownProperties;
-      let totalExpressions = DebuggerView.WatchExpressions.itemCount;
-
-      for (let i = 0; i < totalExpressions; i++) {
-        let name = DebuggerView.WatchExpressions.getString(i);
-        let expVal = ownProperties[i].value;
-        let expRef = aScope.addItem(name, ownProperties[i]);
-        DebuggerView.Variables.controller.addExpander(expRef, expVal);
-
-        // Revert some of the custom watch expressions scope presentation flags,
-        // so that they don't propagate to child items.
-        expRef.switch = null;
-        expRef.delete = null;
-        expRef.descriptorTooltip = true;
-        expRef.separatorStr = L10N.getStr("variablesSeparatorLabel");
-      }
-
-      // Signal that watch expressions have been fetched.
-      window.emit(EVENTS.FETCHED_WATCH_EXPRESSIONS);
-    });
-  },
-
-  /**
-   * Updates a list of watch expressions to evaluate on each pause.
-   * TODO: handle all of this server-side: Bug 832470, comment 14.
-   */
-  syncWatchExpressions: function () {
-    let list = DebuggerView.WatchExpressions.getAllStrings();
-
-    // Sanity check all watch expressions before syncing them. To avoid
-    // having the whole watch expressions array throw because of a single
-    // faulty expression, simply convert it to a string describing the error.
-    // There's no other information necessary to be offered in such cases.
-    let sanitizedExpressions = list.map(aString => {
-      // Reflect.parse throws when it encounters a syntax error.
-      try {
-        Parser.reflectionAPI.parse(aString);
-        return aString; // Watch expression can be executed safely.
-      } catch (e) {
-        function safelyEscape(aString) {
-          // Convert `str`, a string, to JSON -- that is, to a string beginning
-          // and ending with double-quotes, followed by string contents escaped
-          // such that the overall string contents are a JSON string literal.
-          let str = JSON.stringify(aString);
-
-          // Remove the leading and trailing double-quotes.
-          str = str.substring(1, str.length - 1);
-
-          // JSON string literals are not a subset of JS string literals in this
-          // one weird case: JSON string literals can directly contain U+2028
-          // LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR.  Replace these code
-          // points with escaped forms.
-          str = str.replace(/\u2028/g, "\\u2028");
-          str = str.replace(/\u2029/g, "\\u2029");
-
-          return str;
-        }
-        return "\"" +
-               safelyEscape(e.name) + ": " +
-               safelyEscape(e.message) +
-               "\""; // Syntax error.
-      }
-    });
-
-    if (!sanitizedExpressions.length) {
-      this._currentWatchExpressions = null;
-      this._syncedWatchExpressions = null;
-    } else {
-      this._syncedWatchExpressions =
-      this._currentWatchExpressions = "[" +
-        sanitizedExpressions.map(aString =>
-          "eval(\"" +
-            "try {" +
-              // Make sure all quotes are escaped in the expression's syntax,
-              // and add a newline after the statement to avoid comments
-              // breaking the code integrity inside the eval block.
-              aString.replace(/\\/g, "\\\\").replace(/"/g, "\\$&") + "\" + " + "'\\n'" + " + \"" +
-            "} catch (e) {" +
-              "e.name + ': ' + e.message;" + // TODO: Bug 812765, 812764.
-            "}" +
-          "\")"
-        ).join(",") +
-      "]";
-    }
-
-    this.currentFrameDepth = -1;
-    return this._onFrames();
-  }
-};
-
-/**
- * Shortcuts for accessing various debugger preferences.
- */
-var Prefs = new PrefsHelper("devtools", {
-  workersAndSourcesWidth: ["Int", "debugger.ui.panes-workers-and-sources-width"],
-  instrumentsWidth: ["Int", "debugger.ui.panes-instruments-width"],
-  panesVisibleOnStartup: ["Bool", "debugger.ui.panes-visible-on-startup"],
-  variablesSortingEnabled: ["Bool", "debugger.ui.variables-sorting-enabled"],
-  variablesOnlyEnumVisible: ["Bool", "debugger.ui.variables-only-enum-visible"],
-  variablesSearchboxVisible: ["Bool", "debugger.ui.variables-searchbox-visible"],
-  pauseOnExceptions: ["Bool", "debugger.pause-on-exceptions"],
-  ignoreCaughtExceptions: ["Bool", "debugger.ignore-caught-exceptions"],
-  sourceMapsEnabled: ["Bool", "debugger.source-maps-enabled"],
-  prettyPrintEnabled: ["Bool", "debugger.pretty-print-enabled"],
-  autoPrettyPrint: ["Bool", "debugger.auto-pretty-print"],
-  workersEnabled: ["Bool", "debugger.workers"],
-  editorTabSize: ["Int", "editor.tabsize"],
-  autoBlackBox: ["Bool", "debugger.auto-black-box"],
-});
-
-/**
- * Convenient way of emitting events from the panel window.
- */
-EventEmitter.decorate(this);
-
-/**
- * Preliminary setup for the DebuggerController object.
- */
-DebuggerController.initialize();
-DebuggerController.Parser = new Parser();
-DebuggerController.Workers = new Workers();
-DebuggerController.ThreadState = new ThreadState();
-DebuggerController.StackFrames = new StackFrames();
-
-/**
- * Export some properties to the global scope for easier access.
- */
-Object.defineProperties(window, {
-  "gTarget": {
-    get: function () {
-      return DebuggerController._target;
-    },
-    configurable: true
-  },
-  "gHostType": {
-    get: function () {
-      return DebuggerView._hostType;
-    },
-    configurable: true
-  },
-  "gClient": {
-    get: function () {
-      return DebuggerController.client;
-    },
-    configurable: true
-  },
-  "gThreadClient": {
-    get: function () {
-      return DebuggerController.activeThread;
-    },
-    configurable: true
-  },
-  "gCallStackPageSize": {
-    get: function () {
-      return CALL_STACK_PAGE_SIZE;
-    },
-    configurable: true
-  }
-});
-
-/**
- * Helper method for debugging.
- * @param string
- */
-function dumpn(str) {
-  if (wantLogging) {
-    dump("DBG-FRONTEND: " + str + "\n");
-  }
-}
-
-var wantLogging = Services.prefs.getBoolPref("devtools.debugger.log");
deleted file mode 100644
--- a/devtools/client/debugger/debugger-view.js
+++ /dev/null
@@ -1,998 +0,0 @@
-/* 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/. */
-"use strict";
-
-const SOURCE_URL_DEFAULT_MAX_LENGTH = 64; // chars
-const STACK_FRAMES_SOURCE_URL_MAX_LENGTH = 15; // chars
-const STACK_FRAMES_SOURCE_URL_TRIM_SECTION = "center";
-const STACK_FRAMES_SCROLL_DELAY = 100; // ms
-const BREAKPOINT_SMALL_WINDOW_WIDTH = 850; // px
-const RESULTS_PANEL_POPUP_POSITION = "before_end";
-const RESULTS_PANEL_MAX_RESULTS = 10;
-const FILE_SEARCH_ACTION_MAX_DELAY = 300; // ms
-const GLOBAL_SEARCH_EXPAND_MAX_RESULTS = 50;
-const GLOBAL_SEARCH_LINE_MAX_LENGTH = 300; // chars
-const GLOBAL_SEARCH_ACTION_MAX_DELAY = 1500; // ms
-const FUNCTION_SEARCH_ACTION_MAX_DELAY = 400; // ms
-const SEARCH_GLOBAL_FLAG = "!";
-const SEARCH_FUNCTION_FLAG = "@";
-const SEARCH_TOKEN_FLAG = "#";
-const SEARCH_LINE_FLAG = ":";
-const SEARCH_VARIABLE_FLAG = "*";
-const SEARCH_AUTOFILL = [SEARCH_GLOBAL_FLAG, SEARCH_FUNCTION_FLAG, SEARCH_TOKEN_FLAG];
-const TOOLBAR_ORDER_POPUP_POSITION = "topcenter bottomleft";
-const RESIZE_REFRESH_RATE = 50; // ms
-
-const EventListenersView = require("./content/views/event-listeners-view");
-const SourcesView = require("./content/views/sources-view");
-var actions = Object.assign(
-  {},
-  require("./content/globalActions"),
-  require("./content/actions/breakpoints"),
-  require("./content/actions/sources"),
-  require("./content/actions/event-listeners")
-);
-var queries = require("./content/queries");
-var constants = require("./content/constants");
-
-/**
- * Object defining the debugger view components.
- */
-var DebuggerView = {
-
-  /**
-   * This is attached so tests can change it without needing to load an
-   * actual large file in automation
-   */
-  LARGE_FILE_SIZE: 1048576, // 1 MB in bytes
-
-  /**
-   * Initializes the debugger view.
-   *
-   * @return object
-   *         A promise that is resolved when the view finishes initializing.
-   */
-  initialize: function (isWorker) {
-    if (this._startup) {
-      return this._startup;
-    }
-    const deferred = promise.defer();
-    this._startup = deferred.promise;
-
-    this._initializePanes();
-    this._initializeEditor(deferred.resolve);
-    this.Toolbar.initialize();
-    this.Options.initialize();
-    this.Filtering.initialize();
-    this.StackFrames.initialize();
-    this.StackFramesClassicList.initialize();
-    this.Workers.initialize();
-    this.Sources.initialize(isWorker);
-    this.VariableBubble.initialize();
-    this.WatchExpressions.initialize();
-    this.EventListeners.initialize();
-    this.GlobalSearch.initialize();
-    this._initializeVariablesView();
-
-    this._editorSource = {};
-    this._editorDocuments = {};
-
-    this.editor.on("cursorActivity", this.Sources._onEditorCursorActivity);
-
-    this.controller = DebuggerController;
-    const getState = this.controller.getState;
-
-    onReducerEvents(this.controller, {
-      "source-text-loaded": this.renderSourceText,
-      "source-selected": this.renderSourceText,
-      "blackboxed": this.renderBlackBoxed,
-      "prettyprinted": this.renderPrettyPrinted,
-      "breakpoint-added": this.addEditorBreakpoint,
-      "breakpoint-enabled": this.addEditorBreakpoint,
-      "breakpoint-disabled": this.removeEditorBreakpoint,
-      "breakpoint-removed": this.removeEditorBreakpoint,
-      "breakpoint-condition-updated": this.renderEditorBreakpointCondition,
-      "breakpoint-moved": ({ breakpoint, prevLocation }) => {
-        const selectedSource = queries.getSelectedSource(getState());
-        const { location } = breakpoint;
-
-        if (selectedSource &&
-           selectedSource.actor === location.actor) {
-          this.editor.moveBreakpoint(this.toEditorLine(prevLocation.line),
-                                     this.toEditorLine(location.line));
-        }
-      }
-    }, this);
-
-    return deferred.promise;
-  },
-
-  /**
-   * Destroys the debugger view.
-   *
-   * @return object
-   *         A promise that is resolved when the view finishes destroying.
-   */
-  destroy: function () {
-    if (this._hasShutdown) {
-      return;
-    }
-    this._hasShutdown = true;
-
-    window.removeEventListener("resize", this._onResize);
-    this.editor.off("cursorActivity", this.Sources._onEditorCursorActivity);
-
-    this.Toolbar.destroy();
-    this.Options.destroy();
-    this.Filtering.destroy();
-    this.StackFrames.destroy();
-    this.StackFramesClassicList.destroy();
-    this.Sources.destroy();
-    this.VariableBubble.destroy();
-    this.WatchExpressions.destroy();
-    this.EventListeners.destroy();
-    this.GlobalSearch.destroy();
-    this._destroyPanes();
-
-    this.editor.destroy();
-    this.editor = null;
-
-    this.controller.dispatch(actions.removeAllBreakpoints());
-  },
-
-  /**
-   * Initializes the UI for all the displayed panes.
-   */
-  _initializePanes: function () {
-    dumpn("Initializing the DebuggerView panes");
-
-    this._body = document.getElementById("body");
-    this._editorDeck = document.getElementById("editor-deck");
-    this._workersAndSourcesPane = document.getElementById("workers-and-sources-pane");
-    this._instrumentsPane = document.getElementById("instruments-pane");
-    this._instrumentsPaneToggleButton = document.getElementById("instruments-pane-toggle");
-
-    this.showEditor = this.showEditor.bind(this);
-    this.showBlackBoxMessage = this.showBlackBoxMessage.bind(this);
-    this.showProgressBar = this.showProgressBar.bind(this);
-
-    this._onTabSelect = this._onInstrumentsPaneTabSelect.bind(this);
-    this._instrumentsPane.tabpanels.addEventListener("select", this._onTabSelect);
-
-    this._collapsePaneString = L10N.getStr("collapsePanes");
-    this._expandPaneString = L10N.getStr("expandPanes");
-
-    this._workersAndSourcesPane.setAttribute("width", Prefs.workersAndSourcesWidth);
-    this._instrumentsPane.setAttribute("width", Prefs.instrumentsWidth);
-    this.toggleInstrumentsPane({ visible: Prefs.panesVisibleOnStartup });
-
-    this.updateLayoutMode();
-
-    this._onResize = this._onResize.bind(this);
-    window.addEventListener("resize", this._onResize);
-  },
-
-  /**
-   * Destroys the UI for all the displayed panes.
-   */
-  _destroyPanes: function () {
-    dumpn("Destroying the DebuggerView panes");
-
-    if (gHostType != "right" && gHostType != "left") {
-      Prefs.workersAndSourcesWidth = this._workersAndSourcesPane.getAttribute("width");
-      Prefs.instrumentsWidth = this._instrumentsPane.getAttribute("width");
-    }
-
-    this._workersAndSourcesPane = null;
-    this._instrumentsPane = null;
-    this._instrumentsPaneToggleButton = null;
-  },
-
-  /**
-   * Initializes the VariablesView instance and attaches a controller.
-   */
-  _initializeVariablesView: function () {
-    this.Variables = new VariablesView(document.getElementById("variables"), {
-      searchPlaceholder: L10N.getStr("emptyVariablesFilterText"),
-      emptyText: L10N.getStr("emptyVariablesText"),
-      onlyEnumVisible: Prefs.variablesOnlyEnumVisible,
-      searchEnabled: Prefs.variablesSearchboxVisible,
-      eval: (variable, value) => {
-        let string = variable.evaluationMacro(variable, value);
-        DebuggerController.StackFrames.evaluate(string);
-      },
-      lazyEmpty: true
-    });
-
-    // Attach the current toolbox to the VView so it can link DOMNodes to
-    // the inspector/highlighter
-    this.Variables.toolbox = DebuggerController._toolbox;
-
-    // Attach a controller that handles interfacing with the debugger protocol.
-    VariablesViewController.attach(this.Variables, {
-      getEnvironmentClient: aObject => gThreadClient.environment(aObject),
-      getObjectClient: aObject => {
-        return gThreadClient.pauseGrip(aObject);
-      }
-    });
-
-    // Relay events from the VariablesView.
-    this.Variables.on("fetched", aType => {
-      switch (aType) {
-        case "scopes":
-          window.emit(EVENTS.FETCHED_SCOPES);
-          break;
-        case "variables":
-          window.emit(EVENTS.FETCHED_VARIABLES);
-          break;
-        case "properties":
-          window.emit(EVENTS.FETCHED_PROPERTIES);
-          break;
-      }
-    });
-  },
-
-  /**
-   * Initializes the Editor instance.
-   *
-   * @param function aCallback
-   *        Called after the editor finishes initializing.
-   */
-  _initializeEditor: function (callback) {
-    dumpn("Initializing the DebuggerView editor");
-
-    let extraKeys = {};
-    bindKey("_doTokenSearch", "tokenSearchKey");
-    bindKey("_doGlobalSearch", "globalSearchKey", { alt: true });
-    bindKey("_doFunctionSearch", "functionSearchKey");
-    extraKeys[Editor.keyFor("jumpToLine")] = false;
-    extraKeys["Esc"] = false;
-
-    function bindKey(func, key, modifiers = {}) {
-      key = document.getElementById(key).getAttribute("key");
-      let shortcut = Editor.accel(key, modifiers);
-      extraKeys[shortcut] = () => DebuggerView.Filtering[func]();
-    }
-
-    let gutters = ["breakpoints"];
-
-    this.editor = new Editor({
-      mode: Editor.modes.text,
-      readOnly: true,
-      lineNumbers: true,
-      showAnnotationRuler: true,
-      gutters: gutters,
-      extraKeys: extraKeys,
-      contextMenu: "sourceEditorContextMenu",
-      enableCodeFolding: false
-    });
-
-    this.editor.appendTo(document.getElementById("editor")).then(() => {
-      this.editor.extend(DebuggerEditor);
-      this._loadingText = L10N.getStr("loadingText");
-      callback();
-    });
-
-    this.editor.on("gutterClick", (line, button) => {
-      // A right-click shouldn't do anything but keep track of where
-      // it was clicked.
-      if (button == 2) {
-        this.clickedLine = line;
-      }
-      else {
-        const source = queries.getSelectedSource(this.controller.getState());
-        if (source) {
-          const location = { actor: source.actor, line: this.toSourceLine(line) };
-          if (this.editor.hasBreakpoint(line)) {
-            this.controller.dispatch(actions.removeBreakpoint(location));
-          } else {
-            this.controller.dispatch(actions.addBreakpoint(location));
-          }
-        }
-      }
-    });
-
-    this.editor.on("cursorActivity", () => {
-      this.clickedLine = null;
-    });
-  },
-
-  toEditorLine: function (line) {
-    return this.editor.isWasm ? line : line - 1;
-  },
-
-  toSourceLine: function (line) {
-    return this.editor.isWasm ? line : line + 1;
-  },
-
-  updateEditorBreakpoints: function (source) {
-    const breakpoints = queries.getBreakpoints(this.controller.getState());
-    const sources = queries.getSources(this.controller.getState());
-
-    for (let bp of breakpoints) {
-      if (sources[bp.location.actor] && !bp.disabled) {
-        this.addEditorBreakpoint(bp);
-      }
-      else {
-        this.removeEditorBreakpoint(bp);
-      }
-    }
-  },
-
-  addEditorBreakpoint: function (breakpoint) {
-    const { location, condition } = breakpoint;
-    const source = queries.getSelectedSource(this.controller.getState());
-
-    if (source &&
-       source.actor === location.actor &&
-       !breakpoint.disabled) {
-      this.editor.addBreakpoint(this.toEditorLine(location.line), condition);
-    }
-  },
-
-  removeEditorBreakpoint: function (breakpoint) {
-    const { location } = breakpoint;
-    const source = queries.getSelectedSource(this.controller.getState());
-
-    if (source && source.actor === location.actor) {
-      let line = this.toEditorLine(location.line);
-      this.editor.removeBreakpoint(line);
-      this.editor.removeBreakpointCondition(line);
-    }
-  },
-
-  renderEditorBreakpointCondition: function (breakpoint) {
-    const { location, condition, disabled } = breakpoint;
-    const source = queries.getSelectedSource(this.controller.getState());
-
-    if (source && source.actor === location.actor && !disabled) {
-      let line = this.toEditorLine(location.line);
-      if (condition) {
-        this.editor.setBreakpointCondition(line);
-      } else {
-        this.editor.removeBreakpointCondition(line);
-      }
-    }
-  },
-
-  /**
-   * Display the source editor.
-   */
-  showEditor: function () {
-    this._editorDeck.selectedIndex = 0;
-  },
-
-  /**
-   * Display the black box message.
-   */
-  showBlackBoxMessage: function () {
-    this._editorDeck.selectedIndex = 1;
-  },
-
-  /**
-   * Display the progress bar.
-   */
-  showProgressBar: function () {
-    this._editorDeck.selectedIndex = 2;
-  },
-
-  /**
-   * Sets the currently displayed text contents in the source editor.
-   * This resets the mode and undo stack.
-   *
-   * @param string documentKey
-   *        Key to get the correct editor document
-   *
-   * @param string aTextContent
-   *        The source text content.
-   *
-   * @param boolean shouldUpdateText
-            Forces a text and mode reset
-   */
-  _setEditorText: function (documentKey, aTextContent = "", shouldUpdateText = false) {
-    const isNew = this._setEditorDocument(documentKey);
-
-    this.editor.clearDebugLocation();
-    this.editor.clearHistory();
-    this.editor.removeBreakpoints();
-
-    // Only set editor's text and mode if it is a new document
-    if (isNew || shouldUpdateText) {
-      this.editor.setMode(Editor.modes.text);
-      this.editor.setText(aTextContent);
-    }
-  },
-
-  /**
-   * Sets the proper editor mode (JS or HTML) according to the specified
-   * content type, or by determining the type from the url or text content.
-   *
-   * @param string aUrl
-   *        The source url.
-   * @param string aContentType [optional]
-   *        The source content type.
-   * @param string aTextContent [optional]
-   *        The source text content.
-   */
-  _setEditorMode: function (aUrl, aContentType = "", aTextContent = "") {
-    // Use JS mode for files with .js and .jsm extensions.
-    if (SourceUtils.isJavaScript(aUrl, aContentType)) {
-      return void this.editor.setMode(Editor.modes.js);
-    }
-
-    if (aContentType === "text/wasm") {
-      return void this.editor.setMode(Editor.modes.text);
-    }
-
-    // Use HTML mode for files in which the first non whitespace character is
-    // &lt;, regardless of extension.
-    if (typeof aTextContent === 'string' && aTextContent.match(/^\s*</)) {
-      return void this.editor.setMode(Editor.modes.html);
-    }
-
-    // Unknown language, use text.
-    this.editor.setMode(Editor.modes.text);
-  },
-
-  /**
-   * Sets the editor's displayed document.
-   * If there isn't a document for the source, create one
-   *
-   * @param string key - key used to access the editor document cache
-   *
-   * @return boolean isNew - was the document just created
-   */
-  _setEditorDocument: function (key) {
-    let isNew;
-
-    if (!this._editorDocuments[key]) {
-      isNew = true;
-      this._editorDocuments[key] = this.editor.createDocument();
-    } else {
-      isNew = false;
-    }
-
-    const doc = this._editorDocuments[key];
-    this.editor.replaceDocument(doc);
-    return isNew;
-  },
-
-  renderBlackBoxed: function (source) {
-    this._renderSourceText(
-      source,
-      queries.getSourceText(this.controller.getState(), source.actor)
-    );
-  },
-
-  renderPrettyPrinted: function (source) {
-    this._renderSourceText(
-      source,
-      queries.getSourceText(this.controller.getState(), source.actor)
-    );
-  },
-
-  renderSourceText: function (source) {
-    this._renderSourceText(
-      source,
-      queries.getSourceText(this.controller.getState(), source.actor),
-      queries.getSelectedSourceOpts(this.controller.getState())
-    );
-  },
-
-  _renderSourceText: function (source, textInfo, opts = {}) {
-    const selectedSource = queries.getSelectedSource(this.controller.getState());
-
-    // Exit early if we're attempting to render an unselected source
-    if (!selectedSource || selectedSource.actor !== source.actor) {
-      return;
-    }
-
-    if (source.isBlackBoxed) {
-      this.showBlackBoxMessage();
-      setTimeout(() => {
-        window.emit(EVENTS.SOURCE_SHOWN, source);
-      }, 0);
-      return;
-    }
-    else {
-      this.showEditor();
-    }
-
-    if (textInfo.loading) {
-      // TODO: bug 1228866, we need to update `_editorSource` here but
-      // still make the editor be updated when the full text comes
-      // through somehow.
-      this._setEditorText("loading", L10N.getStr("loadingText"));
-      return;
-    }
-    else if (textInfo.error) {
-      let msg = L10N.getFormatStr("errorLoadingText3", textInfo.error);
-      this._setEditorText("error", msg);
-      console.error(new Error(msg));
-      dumpn(msg);
-
-      this.showEditor();
-      window.emit(EVENTS.SOURCE_ERROR_SHOWN, source);
-      return;
-    }
-
-    // If the line is not specified, default to the current frame's position,
-    // if available and the frame's url corresponds to the requested url.
-    if (!("line" in opts)) {
-      let cachedFrames = DebuggerController.activeThread.cachedFrames;
-      let currentDepth = DebuggerController.StackFrames.currentFrameDepth;
-      let frame = cachedFrames[currentDepth];
-      if (frame && frame.source.actor == source.actor) {
-        opts.line = frame.where.line;
-      }
-    }
-
-    if (this._editorSource.actor === source.actor &&
-        this._editorSource.prettyPrinted === source.isPrettyPrinted &&
-        this._editorSource.blackboxed === source.isBlackBoxed) {
-      this.updateEditorPosition(opts);
-      return;
-    }
-
-    let { text, contentType } = textInfo;
-    let shouldUpdateText = this._editorSource.prettyPrinted != source.isPrettyPrinted;
-    this._setEditorText(source.actor, text, shouldUpdateText);
-
-    this._editorSource.actor = source.actor;
-    this._editorSource.prettyPrinted = source.isPrettyPrinted;
-    this._editorSource.blackboxed = source.isBlackBoxed;
-    this._editorSource.prettyPrinted = source.isPrettyPrinted;
-
-    this._setEditorMode(source.url, contentType, text);
-    this.updateEditorBreakpoints(source);
-
-    setTimeout(() => {
-      window.emit(EVENTS.SOURCE_SHOWN, source);
-    }, 0);
-
-    this.updateEditorPosition(opts);
-  },
-
-  updateEditorPosition: function (opts) {
-    let line = opts.line || 0;
-    if (this.editor.isWasm && line > 0) {
-      line = this.toSourceLine(this.editor.wasmOffsetToLine(line));
-    }
-
-    // Line numbers in the source editor should start from 1. If
-    // invalid or not specified, then don't do anything.
-    if (line < 1) {
-      window.emit(EVENTS.EDITOR_LOCATION_SET);
-      return;
-    }
-
-    if (opts.charOffset) {
-      line += this.editor.getPosition(opts.charOffset).line;
-    }
-    if (opts.lineOffset) {
-      line += opts.lineOffset;
-    }
-    line = this.toEditorLine(line);
-    if (opts.moveCursor) {
-      let location = { line: line, ch: opts.columnOffset || 0 };
-      this.editor.setCursor(location);
-    }
-    if (!opts.noDebug) {
-      this.editor.setDebugLocation(line);
-    }
-    window.emit(EVENTS.EDITOR_LOCATION_SET);
-  },
-
-  /**
-   * Update the source editor's current caret and debug location based on
-   * a requested url and line.
-   *
-   * @param string aActor
-   *        The target actor id.
-   * @param number aLine [optional]
-   *        The target line in the source.
-   * @param object aFlags [optional]
-   *        Additional options for showing the source. Supported options:
-   *          - charOffset: character offset for the caret or debug location
-   *          - lineOffset: line offset for the caret or debug location
-   *          - columnOffset: column offset for the caret or debug location
-   *          - noCaret: don't set the caret location at the specified line
-   *          - noDebug: don't set the debug location at the specified line
-   *          - align: string specifying whether to align the specified line
-   *                   at the "top", "center" or "bottom" of the editor
-   *          - force: boolean forcing all text to be reshown in the editor
-   * @return object
-   *         A promise that is resolved after the source text has been set.
-   */
-  setEditorLocation: function (aActor, aLine, aFlags = {}) {
-    // Avoid trying to set a source for a url that isn't known yet.
-    if (!this.Sources.containsValue(aActor)) {
-      throw new Error("Unknown source for the specified URL.");
-    }
-
-    let sourceItem = this.Sources.getItemByValue(aActor);
-    let source = sourceItem.attachment.source;
-
-    // Make sure the requested source client is shown in the editor,
-    // then update the source editor's caret position and debug
-    // location.
-    this.controller.dispatch(actions.selectSource(source, {
-      line: aLine,
-      charOffset: aFlags.charOffset,
-      lineOffset: aFlags.lineOffset,
-      columnOffset: aFlags.columnOffset,
-      moveCursor: !aFlags.noCaret,
-      noDebug: aFlags.noDebug,
-      forceUpdate: aFlags.force
-    }));
-  },
-
-  /**
-   * Gets the visibility state of the instruments pane.
-   * @return boolean
-   */
-  get instrumentsPaneHidden() {
-    return this._instrumentsPane.classList.contains("pane-collapsed");
-  },
-
-  /**
-   * Gets the currently selected tab in the instruments pane.
-   * @return string
-   */
-  get instrumentsPaneTab() {
-    return this._instrumentsPane.selectedTab.id;
-  },
-
-  /**
-   * Sets the instruments pane hidden or visible.
-   *
-   * @param object aFlags
-   *        An object containing some of the following properties:
-   *        - visible: true if the pane should be shown, false to hide
-   *        - animated: true to display an animation on toggle
-   *        - delayed: true to wait a few cycles before toggle
-   *        - callback: a function to invoke when the toggle finishes
-   * @param number aTabIndex [optional]
-   *        The index of the intended selected tab in the details pane.
-   */
-  toggleInstrumentsPane: function (aFlags, aTabIndex) {
-    let pane = this._instrumentsPane;
-    let button = this._instrumentsPaneToggleButton;
-
-    ViewHelpers.togglePane(aFlags, pane);
-
-    if (aFlags.visible) {
-      button.classList.remove("pane-collapsed");
-      button.setAttribute("tooltiptext", this._collapsePaneString);
-    } else {
-      button.classList.add("pane-collapsed");
-      button.setAttribute("tooltiptext", this._expandPaneString);
-    }
-
-    if (aTabIndex !== undefined) {
-      pane.selectedIndex = aTabIndex;
-    }
-  },
-
-  /**
-   * Sets the instruments pane visible after a short period of time.
-   *
-   * @param function aCallback
-   *        A function to invoke when the toggle finishes.
-   */
-  showInstrumentsPane: function (aCallback) {
-    DebuggerView.toggleInstrumentsPane({
-      visible: true,
-      animated: true,
-      delayed: true,
-      callback: aCallback
-    }, 0);
-  },
-
-  /**
-   * Handles a tab selection event on the instruments pane.
-   */
-  _onInstrumentsPaneTabSelect: function () {
-    if (this._instrumentsPane.selectedTab.id == "events-tab") {
-      this.controller.dispatch(actions.fetchEventListeners());
-    }
-  },
-
-  /**
-   * Handles a host change event issued by the parent toolbox.
-   *
-   * @param string aType
-   *        The host type, either "bottom", "left", "right" or "window".
-   */
-  handleHostChanged: function (hostType) {
-    this._hostType = hostType;
-    this.updateLayoutMode();
-  },
-
-  /**
-   * Resize handler for this container's window.
-   */
-  _onResize: function (evt) {
-    // Allow requests to settle down first.
-    setNamedTimeout(
-      "resize-events", RESIZE_REFRESH_RATE, () => this.updateLayoutMode());
-  },
-
-  /**
-   * Set the layout to "vertical" or "horizontal" depending on the host type.
-   */
-  updateLayoutMode: function () {
-    if (this._isSmallWindowHost() ||
-        this._hostType == "left" ||
-        this._hostType == "right") {
-      this._setLayoutMode("vertical");
-    } else {
-      this._setLayoutMode("horizontal");
-    }
-  },
-
-  /**
-   * Check if the current host is in window mode and is
-   * too small for horizontal layout
-   */
-  _isSmallWindowHost: function () {
-    if (this._hostType != "window") {
-      return false;
-    }
-
-    return window.outerWidth <= BREAKPOINT_SMALL_WINDOW_WIDTH;
-  },
-
-  /**
-   * Enter the provided layoutMode. Do nothing if the layout is the same as the current one.
-   * @param {String} layoutMode new layout ("vertical" or "horizontal")
-   */
-  _setLayoutMode: function (layoutMode) {
-    if (this._body.getAttribute("layout") == layoutMode) {
-      return;
-    }
-
-    if (layoutMode == "vertical") {
-      this._enterVerticalLayout();
-    } else {
-      this._enterHorizontalLayout();
-    }
-
-    this._body.setAttribute("layout", layoutMode);
-    window.emit(EVENTS.LAYOUT_CHANGED, layoutMode);
-  },
-
-  /**
-   * Switches the debugger widgets to a vertical layout.
-   */
-  _enterVerticalLayout: function () {
-    let vertContainer = document.getElementById("vertical-layout-panes-container");
-
-    // Move the soruces and instruments panes in a different container.
-    let splitter = document.getElementById("sources-and-instruments-splitter");
-    vertContainer.insertBefore(this._workersAndSourcesPane, splitter);
-    vertContainer.appendChild(this._instrumentsPane);
-
-    // Make sure the vertical layout container's height doesn't repeatedly
-    // grow or shrink based on the displayed sources, variables etc.
-    vertContainer.setAttribute("height",
-      vertContainer.getBoundingClientRect().height);
-  },
-
-  /**
-   * Switches the debugger widgets to a horizontal layout.
-   */
-  _enterHorizontalLayout: function () {
-    let normContainer = document.getElementById("debugger-widgets");
-    let editorPane = document.getElementById("editor-and-instruments-pane");
-
-    // The sources and instruments pane need to be inserted at their
-    // previous locations in their normal container.
-    let splitter = document.getElementById("sources-and-editor-splitter");
-    normContainer.insertBefore(this._workersAndSourcesPane, splitter);
-    editorPane.appendChild(this._instrumentsPane);
-
-    // Revert to the preferred sources and instruments widths, because
-    // they flexed in the vertical layout.
-    this._workersAndSourcesPane.setAttribute("width", Prefs.workersAndSourcesWidth);
-    this._instrumentsPane.setAttribute("width", Prefs.instrumentsWidth);
-  },
-
-  /**
-   * Handles any initialization on a tab navigation event issued by the client.
-   */
-  handleTabNavigation: function () {
-    dumpn("Handling tab navigation in the DebuggerView");
-    this.Filtering.clearSearch();
-    this.GlobalSearch.clearView();
-    this.StackFrames.empty();
-    this.Sources.empty();
-    this.Variables.empty();
-    this.EventListeners.empty();
-
-    if (this.editor) {
-      this.editor.setMode(Editor.modes.text);
-      this.editor.setText("");
-      this.editor.clearHistory();
-      this._editorSource = {};
-      this._editorDocuments = {};
-    }
-  },
-
-  Toolbar: null,
-  Options: null,
-  Filtering: null,
-  GlobalSearch: null,
-  StackFrames: null,
-  Sources: null,
-  Variables: null,
-  VariableBubble: null,
-  WatchExpressions: null,
-  EventListeners: null,
-  editor: null,
-  _loadingText: "",
-  _body: null,
-  _editorDeck: null,
-  _workersAndSourcesPane: null,
-  _instrumentsPane: null,
-  _instrumentsPaneToggleButton: null,
-  _collapsePaneString: "",
-  _expandPaneString: ""
-};
-
-/**
- * A custom items container, used for displaying views like the
- * FilteredSources, FilteredFunctions etc., inheriting the generic WidgetMethods.
- */
-function ResultsPanelContainer() {
-}
-
-ResultsPanelContainer.prototype = extend(WidgetMethods, {
-  /**
-   * Sets the anchor node for this container panel.
-   * @param Node aNode
-   */
-  set anchor(aNode) {
-    this._anchor = aNode;
-
-    // If the anchor node is not null, create a panel to attach to the anchor
-    // when showing the popup.
-    if (aNode) {
-      if (!this._panel) {
-        this._panel = document.createElement("panel");
-        this._panel.id = "results-panel";
-        this._panel.setAttribute("level", "top");
-        this._panel.setAttribute("noautofocus", "true");
-        this._panel.setAttribute("consumeoutsideclicks", "false");
-        document.documentElement.appendChild(this._panel);
-      }
-      if (!this.widget) {
-        this.widget = new SimpleListWidget(this._panel);
-        this.autoFocusOnFirstItem = false;
-        this.autoFocusOnSelection = false;
-        this.maintainSelectionVisible = false;
-      }
-    }
-    // Cleanup the anchor and remove the previously created panel.
-    else {
-      this._panel.remove();
-      this._panel = null;
-      this.widget = null;
-    }
-  },
-
-  /**
-   * Gets the anchor node for this container panel.
-   * @return Node
-   */
-  get anchor() {
-    return this._anchor;
-  },
-
-  /**
-   * Sets the container panel hidden or visible. It's hidden by default.
-   * @param boolean aFlag
-   */
-  set hidden(aFlag) {
-    if (aFlag) {
-      this._panel.hidden = true;
-      this._panel.hidePopup();
-    } else {
-      this._panel.hidden = false;
-      this._panel.openPopup(this._anchor, this.position, this.left, this.top);
-    }
-  },
-
-  /**
-   * Gets this container's visibility state.
-   * @return boolean
-   */
-  get hidden() {
-    return this._panel.state == "closed" ||
-           this._panel.state == "hiding";
-  },
-
-  /**
-   * Removes all items from this container and hides it.
-   */
-  clearView: function () {
-    this.hidden = true;
-    this.empty();
-  },
-
-  /**
-   * Selects the next found item in this container.
-   * Does not change the currently focused node.
-   */
-  selectNext: function () {
-    let nextIndex = this.selectedIndex + 1;
-    if (nextIndex >= this.itemCount) {
-      nextIndex = 0;
-    }
-    this.selectedItem = this.getItemAtIndex(nextIndex);
-  },
-
-  /**
-   * Selects the previously found item in this container.
-   * Does not change the currently focused node.
-   */
-  selectPrev: function () {
-    let prevIndex = this.selectedIndex - 1;
-    if (prevIndex < 0) {
-      prevIndex = this.itemCount - 1;
-    }
-    this.selectedItem = this.getItemAtIndex(prevIndex);
-  },
-
-  /**
-   * Customization function for creating an item's UI.
-   *
-   * @param string aLabel
-   *        The item's label string.
-   * @param string aBeforeLabel
-   *        An optional string shown before the label.
-   * @param string aBelowLabel
-   *        An optional string shown underneath the label.
-   */
-  _createItemView: function (aLabel, aBelowLabel, aBeforeLabel) {
-    let container = document.createElement("vbox");
-    container.className = "results-panel-item";
-
-    let firstRowLabels = document.createElement("hbox");
-    let secondRowLabels = document.createElement("hbox");
-
-    if (aBeforeLabel) {
-      let beforeLabelNode = document.createElement("label");
-      beforeLabelNode.className = "plain results-panel-item-label-before";
-      beforeLabelNode.setAttribute("value", aBeforeLabel);
-      firstRowLabels.appendChild(beforeLabelNode);
-    }
-
-    let labelNode = document.createElement("label");
-    labelNode.className = "plain results-panel-item-label";
-    labelNode.setAttribute("value", aLabel);
-    firstRowLabels.appendChild(labelNode);
-
-    if (aBelowLabel) {
-      let belowLabelNode = document.createElement("label");
-      belowLabelNode.className = "plain results-panel-item-label-below";
-      belowLabelNode.setAttribute("value", aBelowLabel);
-      secondRowLabels.appendChild(belowLabelNode);
-    }
-
-    container.appendChild(firstRowLabels);
-    container.appendChild(secondRowLabels);
-
-    return container;
-  },
-
-  _anchor: null,
-  _panel: null,
-  position: RESULTS_PANEL_POPUP_POSITION,
-  left: 0,
-  top: 0
-});
-
-DebuggerView.EventListeners = new EventListenersView(DebuggerController);
-DebuggerView.Sources = new SourcesView(DebuggerController, DebuggerView);
deleted file mode 100644
--- a/devtools/client/debugger/debugger.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* 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/. */
-
-/* Side pane views */
-
-#workers-pane > tabpanels > tabpanel,
-#sources-pane > tabpanels > tabpanel,
-#instruments-pane > tabpanels > tabpanel {
-  -moz-box-orient: vertical;
-}
-
-/* Toolbar controls */
-
-.devtools-toolbarbutton:not([label]) > .toolbarbutton-text {
-  display: none;
-}
-
-/* Horizontal vs. vertical layout */
-
-#body[layout=vertical] #debugger-widgets {
-  -moz-box-orient: vertical;
-}
-
-#body[layout=vertical] #workers-and-sources-pane {
-  -moz-box-flex: 1;
-}
-
-#body[layout=vertical] #instruments-pane {
-  -moz-box-flex: 2;
-}
-
-#body[layout=vertical] #instruments-pane-toggle {
-  display: none;
-}
-
-#body[layout=vertical] #sources-and-editor-splitter,
-#body[layout=vertical] #editor-and-instruments-splitter {
-  display: none;
-}
-
-#body[layout=horizontal] #vertical-layout-splitter,
-#body[layout=horizontal] #vertical-layout-panes-container {
-  display: none;
-}
-
-#body[layout=vertical] #stackframes {
-  visibility: hidden;
-}
-
-#source-progress-container {
-  display: flex;
-  flex-flow: column;
-  justify-content: center;
-}
-
-#source-progress {
-  flex: none;
-}
-
-#redux-devtools * {
-  display: block;
-}
-
-#redux-devtools span {
-  display: inline
-}
deleted file mode 100644
--- a/devtools/client/debugger/index.xul
+++ /dev/null
@@ -1,479 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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/. -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://devtools/content/shared/widgets/widgets.css" type="text/css"?>
-<?xml-stylesheet href="chrome://devtools/content/debugger/debugger.css" type="text/css"?>
-<?xml-stylesheet href="chrome://devtools/content/debugger/content/tooltip/tooltips-old.css" type="text/css"?>
-<?xml-stylesheet href="chrome://devtools/skin/widgets.css" type="text/css"?>
-<?xml-stylesheet href="chrome://devtools/skin/debugger.css" type="text/css"?>
-
-<!DOCTYPE window [
-  <!ENTITY % debuggerDTD SYSTEM "chrome://devtools/locale/debugger.dtd">
-  %debuggerDTD;
-  <!ENTITY % editMenuDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
-  %editMenuDTD;
-]>
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        xmlns:html="http://www.w3.org/1999/xhtml"
-        macanimationtype="document"
-        fullscreenbutton="true"
-        screenX="4" screenY="4"
-        width="960" height="480"
-        persist="screenX screenY width height sizemode">
-
-  <script type="application/javascript"
-          src="chrome://devtools/content/shared/theme-switching.js"/>
-  <script type="text/javascript" src="chrome://global/content/globalOverlay.js"/>
-  <script type="text/javascript" src="debugger-controller.js"/>
-  <script type="text/javascript" src="debugger-view.js"/>
-  <script type="text/javascript" src="utils.js"/>
-  <script type="text/javascript" src="views/workers-view.js"/>
-  <script type="text/javascript" src="views/variable-bubble-view.js"/>
-  <script type="text/javascript" src="views/watch-expressions-view.js"/>
-  <script type="text/javascript" src="views/global-search-view.js"/>
-  <script type="text/javascript" src="views/toolbar-view.js"/>
-  <script type="text/javascript" src="views/options-view.js"/>
-  <script type="text/javascript" src="views/stack-frames-view.js"/>
-  <script type="text/javascript" src="views/stack-frames-classic-view.js"/>
-  <script type="text/javascript" src="views/filter-view.js"/>
-
-#include ../../../toolkit/content/editMenuCommands.inc.xul
-
-  <commandset id="debuggerCommands"></commandset>
-
-  <popupset id="debuggerPopupset">
-    <menupopup id="sourceEditorContextMenu"
-               onpopupshowing="goUpdateGlobalEditMenuItems()">
-      <menuitem id="se-dbg-cMenu-addBreakpoint"
-                label="&debuggerUI.seMenuBreak;"
-                key="addBreakpointKey"
-                command="addBreakpointCommand"/>
-      <menuitem id="se-dbg-cMenu-addConditionalBreakpoint"
-                label="&debuggerUI.seMenuCondBreak;"
-                key="addConditionalBreakpointKey"
-                command="addConditionalBreakpointCommand"/>
-      <menuitem id="se-dbg-cMenu-editConditionalBreakpoint"
-                label="&debuggerUI.seEditMenuCondBreak;"
-                key="addConditionalBreakpointKey"
-                command="addConditionalBreakpointCommand"/>
-      <menuitem id="se-dbg-cMenu-addAsWatch"
-                label="&debuggerUI.seMenuAddWatch;"
-                key="addWatchExpressionKey"
-                command="addWatchExpressionCommand"/>
-      <menuseparator/>
-      <menuitem id="cMenu_copy" label="&copyCmd.label;"
-                accesskey="&copyCmd.accesskey;" command="cmd_copy"/>
-      <menuseparator/>
-      <menuitem id="cMenu_selectAll" label="&selectAllCmd.label;"
-                accesskey="&selectAllCmd.accesskey;" command="cmd_selectAll"/>
-      <menuseparator/>
-      <menuitem id="se-dbg-cMenu-findFile"
-                label="&debuggerUI.searchFile;"
-                accesskey="&debuggerUI.searchFile.accesskey;"
-                key="fileSearchKey"
-                command="fileSearchCommand"/>
-      <menuitem id="se-dbg-cMenu-findGlobal"
-                label="&debuggerUI.searchGlobal;"
-                accesskey="&debuggerUI.searchGlobal.accesskey;"
-                key="globalSearchKey"
-                command="globalSearchCommand"/>
-      <menuitem id="se-dbg-cMenu-findFunction"
-                label="&debuggerUI.searchFunction;"
-                accesskey="&debuggerUI.searchFunction.accesskey;"
-                key="functionSearchKey"
-                command="functionSearchCommand"/>
-      <menuseparator/>
-      <menuitem id="se-dbg-cMenu-findToken"
-                label="&debuggerUI.searchToken;"
-                accesskey="&debuggerUI.searchToken.accesskey;"
-                key="tokenSearchKey"
-                command="tokenSearchCommand"/>
-      <menuitem id="se-dbg-cMenu-findLine"
-                label="&debuggerUI.searchGoToLine;"
-                accesskey="&debuggerUI.searchGoToLine.accesskey;"
-                key="lineSearchKey"
-                command="lineSearchCommand"/>
-      <menuseparator/>
-      <menuitem id="se-dbg-cMenu-findVariable"
-                label="&debuggerUI.searchVariable;"
-                accesskey="&debuggerUI.searchVariable.accesskey;"
-                key="variableSearchKey"
-                command="variableSearchCommand"/>
-      <menuitem id="se-dbg-cMenu-focusVariables"
-                label="&debuggerUI.focusVariables;"
-                accesskey="&debuggerUI.focusVariables.accesskey;"
-                key="variablesFocusKey"
-                command="variablesFocusCommand"/>
-      <menuitem id="se-dbg-cMenu-prettyPrint"
-                label="&debuggerUI.sources.prettyPrint;"
-                command="prettyPrintCommand"/>
-    </menupopup>
-    <menupopup id="debuggerWatchExpressionsContextMenu">
-      <menuitem id="add-watch-expression"
-                label="&debuggerUI.addWatch;"
-                accesskey="&debuggerUI.addWatch.accesskey;"
-                key="addWatchExpressionKey"
-                command="addWatchExpressionCommand"/>
-      <menuitem id="removeAll-watch-expression"
-                label="&debuggerUI.removeAllWatch;"
-                accesskey="&debuggerUI.removeAllWatch.accesskey;"
-                key="removeAllWatchExpressionsKey"
-                command="removeAllWatchExpressionsCommand"/>
-    </menupopup>
-    <menupopup id="debuggerPrefsContextMenu"
-               position="before_end"
-               onpopupshowing="DebuggerView.Options._onPopupShowing()"
-               onpopuphiding="DebuggerView.Options._onPopupHiding()"
-               onpopuphidden="DebuggerView.Options._onPopupHidden()">
-      <menuitem id="auto-pretty-print"
-                type="checkbox"
-                label="&debuggerUI.autoPrettyPrint;"
-                accesskey="&debuggerUI.autoPrettyPrint.accesskey;"
-                command="toggleAutoPrettyPrint"/>
-      <menuitem id="pause-on-exceptions"
-                type="checkbox"
-                label="&debuggerUI.pauseExceptions;"
-                accesskey="&debuggerUI.pauseExceptions.accesskey;"
-                command="togglePauseOnExceptions"/>
-      <menuitem id="ignore-caught-exceptions"
-                type="checkbox"
-                label="&debuggerUI.ignoreCaughtExceptions;"
-                accesskey="&debuggerUI.ignoreCaughtExceptions.accesskey;"
-                command="toggleIgnoreCaughtExceptions"/>
-      <menuitem id="show-panes-on-startup"
-                type="checkbox"
-                label="&debuggerUI.showPanesOnInit;"
-                accesskey="&debuggerUI.showPanesOnInit.accesskey;"
-                command="toggleShowPanesOnStartup"/>
-      <menuitem id="show-vars-only-enum"
-                type="checkbox"
-                label="&debuggerUI.showOnlyEnum;"
-                accesskey="&debuggerUI.showOnlyEnum.accesskey;"
-                command="toggleShowOnlyEnum"/>
-      <menuitem id="show-vars-filter-box"
-                type="checkbox"
-                label="&debuggerUI.showVarsFilter;"
-                accesskey="&debuggerUI.showVarsFilter.accesskey;"
-                command="toggleShowVariablesFilterBox"/>
-      <menuitem id="show-original-source"
-                type="checkbox"
-                label="&debuggerUI.showOriginalSource;"
-                accesskey="&debuggerUI.showOriginalSource.accesskey;"
-                command="toggleShowOriginalSource"/>
-      <menuitem id="auto-black-box"
-                type="checkbox"
-                label="&debuggerUI.autoBlackBox;"
-                accesskey="&debuggerUI.autoBlackBox.accesskey;"
-                command="toggleAutoBlackBox"/>
-    </menupopup>
-  </popupset>
-
-  <popupset id="debuggerSourcesPopupset">
-    <menupopup id="debuggerSourcesContextMenu">
-      <menuitem id="debugger-sources-context-newtab"
-                label="&debuggerUI.context.newTab;"
-                accesskey="&debuggerUI.context.newTab.accesskey;"/>
-      <menuitem id="debugger-sources-context-copyurl"
-                label="&debuggerUI.context.copyUrl;"
-                accesskey="&debuggerUI.context.copyUrl.accesskey;"/>
-    </menupopup>
-  </popupset>
-
-  <keyset id="debuggerKeys">
-    <key id="nextSourceKey"
-         keycode="VK_DOWN"
-         modifiers="accel alt"
-         command="nextSourceCommand"/>
-    <key id="prevSourceKey"
-         keycode="VK_UP"
-         modifiers="accel alt"
-         command="prevSourceCommand"/>
-    <key id="resumeKey"
-         keycode="&debuggerUI.stepping.resume1;"
-         command="resumeCommand"/>
-    <key id="stepOverKey"
-         keycode="&debuggerUI.stepping.stepOver1;"
-         command="stepOverCommand"/>
-    <key id="stepInKey"
-         keycode="&debuggerUI.stepping.stepIn1;"
-         command="stepInCommand"/>
-    <key id="stepOutKey"
-         keycode="&debuggerUI.stepping.stepOut1;"
-         modifiers="shift"
-         command="stepOutCommand"/>
-    <key id="fileSearchKey"
-         key="&debuggerUI.searchFile.key;"
-         modifiers="accel"
-         command="fileSearchCommand"/>
-    <key id="fileSearchKey"
-         key="&debuggerUI.searchFile.altkey;"
-         modifiers="accel"
-         command="fileSearchCommand"/>
-    <key id="globalSearchKey"
-         key="&debuggerUI.searchGlobal.key;"
-         modifiers="accel alt"
-         command="globalSearchCommand"/>
-    <key id="functionSearchKey"
-         key="&debuggerUI.searchFunction.key;"
-         modifiers="accel"
-         command="functionSearchCommand"/>
-    <key id="tokenSearchKey"
-         key="&debuggerUI.searchToken.key;"
-         modifiers="accel"
-         command="tokenSearchCommand"/>
-    <key id="lineSearchKey"
-         key="&debuggerUI.searchGoToLine.key;"
-         modifiers="accel"
-         command="lineSearchCommand"/>
-    <key id="variableSearchKey"
-         key="&debuggerUI.searchVariable.key;"
-         modifiers="accel alt"
-         command="variableSearchCommand"/>
-    <key id="variablesFocusKey"
-         key="&debuggerUI.focusVariables.key;"
-         modifiers="accel shift"
-         command="variablesFocusCommand"/>
-    <key id="addBreakpointKey"
-         key="&debuggerUI.seMenuBreak.key;"
-         modifiers="accel"
-         command="addBreakpointCommand"/>
-    <key id="addConditionalBreakpointKey"
-         key="&debuggerUI.seMenuCondBreak.key;"
-         modifiers="accel shift"
-         command="addConditionalBreakpointCommand"/>
-    <key id="addWatchExpressionKey"
-         key="&debuggerUI.seMenuAddWatch.key;"
-         modifiers="accel shift"
-         command="addWatchExpressionCommand"/>
-    <key id="removeAllWatchExpressionsKey"
-         key="&debuggerUI.removeAllWatch.key;"
-         modifiers="accel alt"
-         command="removeAllWatchExpressionsCommand"/>
-    <key id="debuggerSourcesCopyUrl"
-         key="&debuggerUI.context.copyUrl.key;"
-         modifiers="accel"
-         oncommand="DebuggerView.Sources._onCopyUrlCommand()"/>
-  </keyset>
-
-  <vbox id="body"
-        class="theme-body"
-        layout="horizontal"
-        flex="1">
-    <toolbar id="debugger-toolbar"
-             class="devtools-toolbar">
-      <hbox id="debugger-controls"
-            class="devtools-toolbarbutton-group">
-        <toolbarbutton id="resume"
-                       class="devtools-toolbarbutton"
-                       tabindex="0"/>
-        <toolbarbutton id="step-over"
-                       class="devtools-toolbarbutton"
-                       tabindex="0"/>
-        <toolbarbutton id="step-in"
-                       class="devtools-toolbarbutton"
-                       tabindex="0"/>
-        <toolbarbutton id="step-out"
-                       class="devtools-toolbarbutton"
-                       tabindex="0"/>
-      </hbox>
-      <vbox id="stackframes" flex="1"/>
-      <textbox id="searchbox"
-               class="devtools-searchinput" type="search"/>
-      <toolbarbutton id="instruments-pane-toggle"
-                     class="devtools-toolbarbutton"
-                     tooltiptext="&debuggerUI.panesButton.tooltip;"
-                     tabindex="0"/>
-      <toolbarbutton id="debugger-options"
-                     class="devtools-toolbarbutton devtools-option-toolbarbutton"
-                     tooltiptext="&debuggerUI.optsButton.tooltip;"
-                     popup="debuggerPrefsContextMenu"
-                     tabindex="0"/>
-    </toolbar>
-    <vbox id="globalsearch" orient="vertical" hidden="true"/>
-    <splitter class="devtools-horizontal-splitter" hidden="true"/>
-    <hbox id="debugger-widgets" flex="1">
-      <vbox id="workers-and-sources-pane">
-        <tabbox id="workers-pane"
-                class="devtools-sidebar-tabs"
-                flex="0"
-                hidden="true">
-          <tabs>
-            <tab id="workers-tab"
-                 crop="end"
-                 label="&debuggerUI.tabs.workers;"/>
-          </tabs>
-          <tabpanels flex="1">
-            <tabpanel>
-              <vbox id="workers" flex="1"/>
-            </tabpanel>
-          </tabpanels>
-        </tabbox>
-        <splitter id="workers-splitter"
-                  class="devtools-horizontal-splitter"
-                  hidden="true" />
-        <tabbox id="sources-pane"
-                class="devtools-sidebar-tabs"
-                flex="1">
-          <tabs>
-            <tab id="sources-tab"
-                 crop="end"
-                 label="&debuggerUI.tabs.sources;"/>
-            <tab id="callstack-tab"
-                 crop="end"
-                 label="&debuggerUI.tabs.callstack;"/>
-          </tabs>
-          <tabpanels flex="1">
-            <tabpanel id="sources-tabpanel">
-              <vbox id="sources" flex="1"/>
-              <toolbar id="sources-toolbar" class="devtools-toolbar">
-                <hbox id="sources-controls"
-                      class="devtools-toolbarbutton-group">
-                  <toolbarbutton id="black-box"
-                                 class="devtools-toolbarbutton"
-                                 tooltiptext="&debuggerUI.sources.blackBoxTooltip;"
-                                 command="blackBoxCommand"/>
-                  <toolbarbutton id="pretty-print"
-                                 class="devtools-toolbarbutton"
-                                 tooltiptext="&debuggerUI.sources.prettyPrint;"
-                                 command="prettyPrintCommand"
-                                 hidden="true"/>
-                </hbox>
-                <vbox class="devtools-separator"/>
-                <toolbarbutton id="toggle-breakpoints"
-                               class="devtools-toolbarbutton"
-                               tooltiptext="&debuggerUI.sources.toggleBreakpoints;"
-                               command="toggleBreakpointsCommand"/>
-              </toolbar>
-            </tabpanel>
-            <tabpanel id="callstack-tabpanel">
-              <vbox id="callstack-list" flex="1"/>
-            </tabpanel>
-          </tabpanels>
-        </tabbox>
-      </vbox>
-      <splitter id="sources-and-editor-splitter"
-                class="devtools-side-splitter"/>
-      <vbox id="debugger-content" flex="1">
-        <hbox id="editor-and-instruments-pane" flex="1">
-          <deck id="editor-deck" flex="1" class="devtools-main-content">
-            <vbox id="editor"/>
-            <vbox id="black-boxed-message"
-                  align="center"
-                  pack="center">
-              <description id="black-boxed-message-label">
-                &debuggerUI.blackBoxMessage.label;
-              </description>
-              <button id="black-boxed-message-button"
-                      class="devtools-toolbarbutton"
-                      label="&debuggerUI.blackBoxMessage.unBlackBoxButton;"
-                      command="unBlackBoxCommand"/>
-            </vbox>
-            <html:div id="source-progress-container"
-                      align="center">
-              <html:div id="hbox">
-                <html:progress id="source-progress"></html:progress>
-              </html:div>
-            </html:div>
-          </deck>
-          <splitter id="editor-and-instruments-splitter"
-                    class="devtools-side-splitter"/>
-          <tabbox id="instruments-pane"
-                  class="devtools-sidebar-tabs"
-                  hidden="true">
-            <tabs>
-              <tab id="variables-tab"
-                   crop="end"
-                   label="&debuggerUI.tabs.variables;"/>
-              <tab id="events-tab"
-                   crop="end"
-                   label="&debuggerUI.tabs.events;"/>
-            </tabs>
-            <tabpanels flex="1">
-              <tabpanel id="variables-tabpanel">
-                <vbox id="expressions"/>
-                <splitter class="devtools-horizontal-splitter"/>
-                <vbox id="variables" flex="1"/>
-              </tabpanel>
-              <tabpanel id="events-tabpanel">
-                <vbox id="event-listeners" flex="1"/>
-              </tabpanel>
-            </tabpanels>
-          </tabbox>
-        </hbox>
-      </vbox>
-      <splitter id="vertical-layout-splitter"
-                class="devtools-horizontal-splitter"/>
-      <hbox id="vertical-layout-panes-container">
-        <splitter id="sources-and-instruments-splitter"
-                  class="devtools-side-splitter"/>
-        <!-- The sources-pane and instruments-pane will be moved in this
-             container if the toolbox's host requires it. -->
-      </hbox>
-    </hbox>
-  </vbox>
-
-  <panel id="searchbox-help-panel"
-         level="top"
-         type="arrow"
-         position="before_start"
-         noautofocus="true"
-         consumeoutsideclicks="false">
-    <vbox>
-      <hbox>
-        <label id="filter-label"/>
-      </hbox>
-      <label id="searchbox-panel-operators"
-             value="&debuggerUI.searchPanelOperators;"/>
-      <hbox align="center">
-        <button id="global-operator-button"
-                class="searchbox-panel-operator-button devtools-monospace"
-                command="globalSearchCommand"/>
-        <label id="global-operator-label"
-               class="plain searchbox-panel-operator-label"/>
-      </hbox>
-      <hbox align="center">
-        <button id="function-operator-button"
-                class="searchbox-panel-operator-button devtools-monospace"
-                command="functionSearchCommand"/>
-        <label id="function-operator-label"
-               class="plain searchbox-panel-operator-label"/>
-      </hbox>
-      <hbox align="center">
-        <button id="token-operator-button"
-                class="searchbox-panel-operator-button devtools-monospace"
-                command="tokenSearchCommand"/>
-        <label id="token-operator-label"
-               class="plain searchbox-panel-operator-label"/>
-      </hbox>
-      <hbox align="center">
-        <button id="line-operator-button"
-                class="searchbox-panel-operator-button devtools-monospace"
-                command="lineSearchCommand"/>
-        <label id="line-operator-label"
-               class="plain searchbox-panel-operator-label"/>
-      </hbox>
-      <hbox align="center">
-        <button id="variable-operator-button"
-                class="searchbox-panel-operator-button devtools-monospace"
-                command="variableSearchCommand"/>
-        <label id="variable-operator-label"
-               class="plain searchbox-panel-operator-label"/>
-      </hbox>
-    </vbox>
-  </panel>
-
-  <panel id="conditional-breakpoint-panel"
-         level="top"
-         type="arrow"
-         noautofocus="true"
-         consumeoutsideclicks="false">
-    <vbox>
-      <label id="conditional-breakpoint-panel-description"
-             value="&debuggerUI.condBreakPanelTitle;"/>
-      <textbox id="conditional-breakpoint-panel-textbox"/>
-    </vbox>
-  </panel>
-</window>
--- a/devtools/client/debugger/moz.build
+++ b/devtools/client/debugger/moz.build
@@ -1,22 +1,16 @@
 # 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/.
 
 DIRS += [
-    'content',
     'new'
 ]
 
-DevToolsModules(
-    'panel.js'
-)
-
 BROWSER_CHROME_MANIFESTS += [
   'new/test/mochitest/browser.ini',
-  'test/mochitest/browser.ini',
-  'test/mochitest/browser2.ini'
+  'test/mochitest/browser.ini'
 ]
 
 with Files('**'):
     BUG_COMPONENT = ('DevTools', 'Debugger')
--- a/devtools/client/debugger/new/test/mochitest/head.js
+++ b/devtools/client/debugger/new/test/mochitest/head.js
@@ -41,22 +41,16 @@ Services.scriptloader.loadSubScript(
 Services.scriptloader.loadSubScript(
   "chrome://mochitests/content/browser/devtools/client/debugger/new/test/mochitest/helpers.js",
   this
 );
 
 const EXAMPLE_URL =
   "http://example.com/browser/devtools/client/debugger/new/test/mochitest/examples/";
 
-Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", true);
-
-registerCleanupFunction(() => {
-  Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
-});
-
 // NOTE: still experimental, the screenshots might not be exactly correct
 async function takeScreenshot(dbg) {
   let canvas = dbg.win.document.createElementNS(
     "http://www.w3.org/1999/xhtml",
     "html:canvas"
   );
   let context = canvas.getContext("2d");
   canvas.width = dbg.win.innerWidth;
deleted file mode 100644
--- a/devtools/client/debugger/panel.js
+++ /dev/null
@@ -1,185 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* 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/. */
-"use strict";
-
-const { Cc, Ci, Cu, Cr } = require("chrome");
-const promise = require("promise");
-const EventEmitter = require("devtools/shared/event-emitter");
-const DevToolsUtils = require("devtools/shared/DevToolsUtils");
-
-function DebuggerPanel(iframeWindow, toolbox) {
-  this.panelWin = iframeWindow;
-  this._toolbox = toolbox;
-  this._destroyer = null;
-
-  this._view = this.panelWin.DebuggerView;
-  this._controller = this.panelWin.DebuggerController;
-  this._view._hostType = this._toolbox.hostType;
-  this._controller._target = this.target;
-  this._controller._toolbox = this._toolbox;
-
-  this.handleHostChanged = this.handleHostChanged.bind(this);
-  EventEmitter.decorate(this);
-}
-
-exports.DebuggerPanel = DebuggerPanel;
-
-DebuggerPanel.prototype = {
-  /**
-   * Open is effectively an asynchronous constructor.
-   *
-   * @return object
-   *         A promise that is resolved when the Debugger completes opening.
-   */
-  open: function () {
-    // Listen for tab switching events to manage focus when the content window
-    // is paused and events suppressed.
-    if (this.target.isLocalTab) {
-      this.target.tab.addEventListener("TabSelect", this);
-    }
-
-    return Promise.resolve(this._controller.startupDebugger())
-      .then(() => this._controller.connect())
-      .then(() => {
-        this._toolbox.on("host-changed", this.handleHostChanged);
-        // Add keys from this document's keyset to the toolbox, so they
-        // can work when the split console is focused.
-        let keysToClone = ["resumeKey", "stepOverKey", "stepInKey", "stepOutKey"];
-        for (let key of keysToClone) {
-          let elm = this.panelWin.document.getElementById(key);
-          let keycode = elm.getAttribute("keycode");
-          let modifiers = elm.getAttribute("modifiers");
-          let command = elm.getAttribute("command");
-          let handler = this._view.Toolbar.getCommandHandler(command);
-
-          let keyShortcut = this.translateToKeyShortcut(keycode, modifiers);
-          this._toolbox.useKeyWithSplitConsole(keyShortcut, handler, "jsdebugger");
-        }
-        this.isReady = true;
-        this.emit("ready");
-        return this;
-      })
-      .catch(function onError(aReason) {
-        DevToolsUtils.reportException("DebuggerPanel.prototype.open", aReason);
-      });
-  },
-
-  /**
-   * Translate a VK_ keycode, with modifiers, to a key shortcut that can be used with
-   * shared/key-shortcut.
-   *
-   * @param {String} keycode
-   *        The VK_* keycode to translate
-   * @param {String} modifiers
-   *        The list (blank-space separated) of modifiers applying to this keycode.
-   * @return {String} a key shortcut ready to be used with shared/key-shortcut.js
-   */
-  translateToKeyShortcut: function (keycode, modifiers) {
-    // Remove the VK_ prefix.
-    keycode = keycode.replace("VK_", "");
-
-    // Translate modifiers
-    if (modifiers.includes("shift")) {
-      keycode = "Shift+" + keycode;
-    }
-    if (modifiers.includes("alt")) {
-      keycode = "Alt+" + keycode;
-    }
-    if (modifiers.includes("control")) {
-      keycode = "Ctrl+" + keycode;
-    }
-    if (modifiers.includes("meta")) {
-      keycode = "Cmd+" + keycode;
-    }
-    if (modifiers.includes("accel")) {
-      keycode = "CmdOrCtrl+" + keycode;
-    }
-
-    return keycode;
-  },
-
-  // DevToolPanel API
-
-  get target() {
-    return this._toolbox.target;
-  },
-
-  destroy: function () {
-    // Make sure this panel is not already destroyed.
-    if (this._destroyer) {
-      return this._destroyer;
-    }
-
-    if (!this.target.isRemote) {
-      this.target.tab.removeEventListener("TabSelect", this);
-    }
-
-    return this._destroyer = this._controller.shutdownDebugger().then(() => {
-      this.emit("destroyed");
-    });
-  },
-
-  // DebuggerPanel API
-
-  getMappedExpression(expression) {
-    // No-op implementation since this feature doesn't exist in the older
-    // debugger implementation.
-    return null;
-  },
-
-  isPaused() {
-    let framesController = this.panelWin.DebuggerController.StackFrames;
-    let thread = framesController.activeThread;
-    return thread && thread.paused;
-  },
-
-  getFrames() {
-    let framesController = this.panelWin.DebuggerController.StackFrames;
-    let thread = framesController.activeThread;
-    if (this.isPaused()) {
-      return {
-        frames: thread.cachedFrames,
-        selected: framesController.currentFrameDepth,
-      };
-    }
-
-    return null;
-  },
-
-  addBreakpoint: function (location) {
-    const { actions } = this.panelWin;
-    const { dispatch } = this._controller;
-
-    return dispatch(actions.addBreakpoint(location));
-  },
-
-  removeBreakpoint: function (location) {
-    const { actions } = this.panelWin;
-    const { dispatch } = this._controller;
-
-    return dispatch(actions.removeBreakpoint(location));
-  },
-
-  blackbox: function (source, flag) {
-    const { actions } = this.panelWin;
-    const { dispatch } = this._controller;
-    return dispatch(actions.blackbox(source, flag));
-  },
-
-  handleHostChanged: function () {
-    this._view.handleHostChanged(this._toolbox.hostType);
-  },
-
-  // nsIDOMEventListener API
-
-  handleEvent: function (aEvent) {
-    if (aEvent.target == this.target.tab &&
-        this._controller.activeThread.state == "paused") {
-      // Wait a tick for the content focus event to be delivered.
-      DevToolsUtils.executeSoon(() => this._toolbox.focusTool("jsdebugger"));
-    }
-  }
-};
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon3/lib/main.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var { Cc, Ci } = require("chrome");
-var observerService = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
-
-var observer = {
-  observe: function () {
-    debugger;
-  }
-};
-
-observerService.addObserver(observer, "debuggerAttached");
-
-var devtoolsLoaderDestroyObserver = {
-  observe: function () {
-    // Remove all observers on devtools:loader:destroy
-    observerService.removeObserver(observer, "debuggerAttached");
-    observerService.removeObserver(devtoolsLoaderDestroyObserver, "devtools:loader:destroy");
-  }
-};
-
-observerService.addObserver(devtoolsLoaderDestroyObserver, "devtools:loader:destroy");
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon3/package.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "name": "browser_dbg_addon3",
-  "title": "browser_dbg_addon3",
-  "id": "jid1-ami3akps3baaeg",
-  "description": "a basic add-on",
-  "author": "",
-  "license": "MPL 2.0",
-  "version": "0.1"
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/bootstrap.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-function notify() {
-  // Log objects so makeDebuggeeValue can get the global to use
-  console.log({ msg: "Hello again" });
-}
-
-function startup(aParams, aReason) {
-  const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm", {});
-  let res = Services.io.getProtocolHandler("resource")
-                       .QueryInterface(Ci.nsIResProtocolHandler);
-  res.setSubstitution("browser_dbg_addon4", aParams.resourceURI);
-
-  // Load a JS module
-  ChromeUtils.import("resource://browser_dbg_addon4/test.jsm"); // eslint-disable-line mozilla/no-single-arg-cu-import
-  // Log objects so makeDebuggeeValue can get the global to use
-  console.log({ msg: "Hello from the test add-on" });
-
-  Services.obs.addObserver(notify, "addon-test-ping");
-}
-
-function shutdown(aParams, aReason) {
-  Services.obs.removeObserver(notify, "addon-test-ping");
-
-  // Unload the JS module
-  Cu.unload("resource://browser_dbg_addon4/test.jsm");
-
-  let res = Services.io.getProtocolHandler("resource")
-                       .QueryInterface(Ci.nsIResProtocolHandler);
-  res.setSubstitution("browser_dbg_addon4", null);
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/chrome.manifest
+++ /dev/null
@@ -1,1 +0,0 @@
-content browser_dbg_addon4 .
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/install.rdf
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
-  <Description about="urn:mozilla:install-manifest">
-    <em:id>browser_dbg_addon4@tests.mozilla.org</em:id>
-    <em:version>1.0</em:version>
-    <em:name>Test add-on with JS Modules</em:name>
-    <em:bootstrap>true</em:bootstrap>
-    <em:targetApplication>
-      <Description>
-        <em:id>toolkit@mozilla.org</em:id>
-        <em:minVersion>0</em:minVersion>
-        <em:maxVersion>*</em:maxVersion>
-      </Description>
-    </em:targetApplication>
-  </Description>
-</RDF>
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/test.jsm
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const EXPORTED_SYMBOLS = ["Foo"];
-
-const Foo = {};
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/test.xul
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="text/javascript" src="testxul.js"/>
-  <label value="test.xul"/>
-</window>
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/test2.jsm
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const EXPORTED_SYMBOLS = ["Bar"];
-
-const Bar = {};
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/test2.xul
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="text/javascript" src="testxul2.js"/>
-  <label value="test2.xul"/>
-</window>
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/testxul.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// Define something in here or the script may get collected
-window.addEventListener("unload", function () {
-  window.foo = "bar";
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon4/testxul2.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// Define something in here or the script may get collected
-window.addEventListener("unload", function () {
-  window.foo = "bar";
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/bootstrap.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function startup(aParams, aReason) {
-  ChromeUtils.import("resource://gre/modules/Services.jsm");
-  let res = Services.io.getProtocolHandler("resource")
-                       .QueryInterface(Ci.nsIResProtocolHandler);
-  res.setSubstitution("browser_dbg_addon5", aParams.resourceURI);
-
-  // Load a JS module
-  ChromeUtils.import("resource://browser_dbg_addon5/test.jsm");
-}
-
-function shutdown(aParams, aReason) {
-  // Unload the JS module
-  Cu.unload("resource://browser_dbg_addon5/test.jsm");
-
-  let res = Services.io.getProtocolHandler("resource")
-                       .QueryInterface(Ci.nsIResProtocolHandler);
-  res.setSubstitution("browser_dbg_addon5", null);
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/chrome.manifest
+++ /dev/null
@@ -1,1 +0,0 @@
-content browser_dbg_addon5 .
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/install.rdf
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
-  <Description about="urn:mozilla:install-manifest">
-    <em:id>browser_dbg_addon5@tests.mozilla.org</em:id>
-    <em:version>1.0</em:version>
-    <em:name>Test unpacked add-on with JS Modules</em:name>
-    <em:bootstrap>true</em:bootstrap>
-    <em:unpack>true</em:unpack>
-    <em:targetApplication>
-      <Description>
-        <em:id>toolkit@mozilla.org</em:id>
-        <em:minVersion>0</em:minVersion>
-        <em:maxVersion>*</em:maxVersion>
-      </Description>
-    </em:targetApplication>
-  </Description>
-</RDF>
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/test.jsm
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const EXPORTED_SYMBOLS = ["Foo"];
-
-const Foo = {};
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/test.xul
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="text/javascript" src="testxul.js"/>
-  <label value="test.xul"/>
-</window>
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/test2.jsm
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const EXPORTED_SYMBOLS = ["Bar"];
-
-const Bar = {};
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/test2.xul
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="text/javascript" src="testxul2.js"/>
-  <label value="test2.xul"/>
-</window>
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/testxul.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// Define something in here or the script may get collected
-window.addEventListener("unload", function () {
-  window.foo = "bar";
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon5/testxul2.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// Define something in here or the script may get collected
-window.addEventListener("unload", function () {
-  window.foo = "bar";
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon_webext_contentscript/manifest.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-  "manifest_version": 2,
-  "name": "test content script sources",
-  "description": "test content script sources",
-  "version": "0.1.0",
-  "applications": {
-    "gecko": {
-      "id": "test-contentscript-sources@mozilla.com"
-    }
-  },
-  "content_scripts": [
-    {
-      "matches": ["<all_urls>"],
-      "js": ["webext-content-script.js"],
-      "run_at": "document_start"
-    }
-  ]
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon_webext_contentscript/webext-content-script.js
+++ /dev/null
@@ -1,1 +0,0 @@
-console.log("CONTENT SCRIPT LOADED");
deleted file mode 100644
index 9e61dec1d598d7c00e07eb9d03f89784fa450485..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 56b38761d211ae7ee09f1773a207e8ba83b60d30..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/devtools/client/debugger/test/mochitest/browser.ini
+++ b/devtools/client/debugger/test/mochitest/browser.ini
@@ -2,196 +2,53 @@
 # to facilitate better chunking; see bug 1294489.
 
 [DEFAULT]
 tags = devtools
 subsuite = devtools
 skip-if = (os == 'linux' && debug && bits == 32)
 support-files =
   addon4.xpi
-  addon5.xpi
-  addon-webext-contentscript.xpi
-  addon-source/browser_dbg_addon5/*
-  code_binary_search.coffee
-  code_binary_search.js
-  code_binary_search.map
-  code_breakpoints-break-on-last-line-of-script-on-reload.js
-  code_breakpoints-other-tabs.js
-  code_bug-896139.js
-  code_frame-script.js
-  code_function-jump-01.js
-  code_function-search-01.js
-  code_function-search-02.js
-  code_function-search-03.js
-  code_location-changes.js
   code_listworkers-worker1.js
   code_listworkers-worker2.js
-  code_math.js
-  code_math.map
-  code_math.min.js
-  code_math_bogus_map.js
-  code_same-line-functions.js
-  code_script-eval.js
-  code_script-switching-01.js
-  code_script-switching-02.js
-  code_test-editor-mode
-  code_ugly.js
-  code_ugly-2.js
-  code_ugly-3.js
-  code_ugly-4.js
-  code_ugly-5.js
-  code_ugly-6.js
-  code_ugly-7.js
-  code_ugly-8
-  code_ugly-8^headers^
-  code_worker-source-map.coffee
-  code_worker-source-map.js
-  code_worker-source-map.js.map
-  code_WorkerTargetActor.attach-worker1.js
-  code_WorkerTargetActor.attach-worker2.js
   code_WorkerTargetActor.attachThread-worker.js
-  doc_binary_search.html
-  doc_breakpoints-break-on-last-line-of-script-on-reload.html
-  doc_breakpoints-other-tabs.html
-  doc_breakpoints-reload.html
-  doc_bug-896139.html
-  doc_closures.html
-  doc_closure-optimized-out.html
-  doc_breakpoint-move.html
-  doc_conditional-breakpoints.html
-  doc_domnode-variables.html
-  doc_editor-mode.html
-  doc_empty-tab-01.html
-  doc_empty-tab-02.html
   doc_event-listeners-01.html
-  doc_event-listeners-02.html
   doc_event-listeners-03.html
-  doc_frame-parameters.html
-  doc_function-display-name.html
-  doc_function-jump.html
-  doc_function-search.html
-  doc_iframes.html
-  doc_included-script.html
   doc_inline-debugger-statement.html
-  doc_inline-script.html
-  doc_large-array-buffer.html
   doc_listworkers-tab.html
-  doc_map-set.html
-  doc_minified.html
-  doc_minified_bogus_map.html
   doc_native-event-handler.html
-  doc_no-page-sources.html
-  doc_pause-exceptions.html
   doc_promise-get-allocation-stack.html
   doc_promise-get-fulfillment-stack.html
   doc_promise-get-rejection-stack.html
-  doc_promise.html
-  doc_proxy.html
-  doc_random-javascript.html
-  doc_recursion-stack.html
-  doc_scope-variable.html
-  doc_scope-variable-2.html
-  doc_scope-variable-3.html
-  doc_scope-variable-4.html
-  doc_script-eval.html
-  doc_script-bookmarklet.html
-  doc_script-switching-01.html
-  doc_script-switching-02.html
-  doc_script_webext_contentscript.html
-  doc_split-console-paused-reload.html
-  doc_step-many-statements.html
-  doc_step-out.html
   doc_terminate-on-tab-close.html
-  doc_watch-expressions.html
-  doc_watch-expression-button.html
-  doc_whitespace-property-names.html
-  doc_with-frame.html
-  doc_worker-source-map.html
-  doc_WorkerTargetActor.attach-tab1.html
-  doc_WorkerTargetActor.attach-tab2.html
   doc_WorkerTargetActor.attachThread-tab.html
   head.js
-  sjs_post-page.sjs
-  sjs_random-javascript.sjs
-  testactors.js
   !/devtools/client/shared/test/shared-head.js
   !/devtools/client/shared/test/telemetry-test-helpers.js
-
-[browser_dbg_aaa_run_first_leaktest.js]
-skip-if = e10s && debug
-[browser_dbg_addon-modules.js]
-skip-if = e10s # TODO
-tags = addons
-[browser_dbg_addon-modules-unpacked.js]
-skip-if = e10s # TODO
-tags = addons
 [browser_dbg_addon-console.js]
-skip-if = e10s && debug || os == 'win' || verify # bug 1005274
+skip-if = (e10s && debug || os == 'win' || verify) || true # bug 1005274
 tags = addons
-[browser_dbg_bfcache.js]
-skip-if = e10s || true # bug 1113935
-[browser_dbg_break-in-anon.js]
-[browser_dbg_break-on-next.js]
-skip-if = true # Bug 1437712
-[browser_dbg_break-on-next-console.js]
-uses-unsafe-cpows = true
-[browser_dbg_break-unselected.js]
-[browser_dbg_breakpoints-editor.js]
-skip-if = e10s && debug
-[browser_dbg_breakpoints-eval.js]
-skip-if = e10s && debug
-[browser_dbg_breakpoints-new-script.js]
-skip-if = e10s && debug
-[browser_dbg_breakpoints-other-tabs.js]
-skip-if = e10s && debug
-[browser_dbg_bug-896139.js]
-skip-if = e10s && debug
-[browser_dbg_clean-exit.js]
-skip-if = true # Bug 1044985 (racy test)
-[browser_dbg_closure-inspection.js]
-skip-if = e10s && debug
-[browser_dbg_conditional-breakpoints-01.js]
-skip-if = e10s && debug
-[browser_dbg_conditional-breakpoints-02.js]
-skip-if = e10s && debug
-[browser_dbg_conditional-breakpoints-03.js]
-skip-if = e10s && debug
-[browser_dbg_conditional-breakpoints-04.js]
-skip-if = e10s && debug
-[browser_dbg_conditional-breakpoints-05.js]
-skip-if = e10s && debug
-[browser_dbg_console-eval.js]
-skip-if = e10s && debug
-[browser_dbg_console-named-eval.js]
-skip-if = e10s && debug
-[browser_dbg_server-conditional-bp-01.js]
-skip-if = e10s && debug || (os == "linux") # Bug 1468669
-[browser_dbg_server-conditional-bp-02.js]
-skip-if = e10s && debug
-[browser_dbg_server-conditional-bp-03.js]
-skip-if = e10s && debug
-[browser_dbg_server-conditional-bp-04.js]
-skip-if = e10s && debug
-[browser_dbg_server-conditional-bp-05.js]
-skip-if = e10s && debug
-[browser_dbg_controller-evaluate-01.js]
-skip-if = e10s && debug
-[browser_dbg_controller-evaluate-02.js]
-skip-if = e10s && debug
 [browser_dbg_debugger-statement.js]
 skip-if = e10s && debug
 [browser_dbg_event-listeners-01.js]
 skip-if = e10s && debug
 [browser_dbg_event-listeners-02.js]
 skip-if = e10s && debug
 [browser_dbg_event-listeners-03.js]
 skip-if = e10s && debug
-[browser_dbg_file-reload.js]
-skip-if = e10s && debug
-[browser_dbg_host-layout.js]
-skip-if = e10s && debug
-[browser_dbg_jump-to-function-definition.js]
-skip-if = e10s && debug
-[browser_dbg_iframes.js]
-skip-if = e10s # TODO
-[browser_dbg_interrupts.js]
-skip-if = e10s && debug
 [browser_dbg_listworkers.js]
+[browser_dbg_promises-allocation-stack.js]
+uses-unsafe-cpows = true
+skip-if = true
+[browser_dbg_promises-chrome-allocation-stack.js]
+uses-unsafe-cpows = true
+skip-if = true # Bug 1177730
+[browser_dbg_promises-fulfillment-stack.js]
+uses-unsafe-cpows = true
+skip-if = true
+[browser_dbg_promises-rejection-stack.js]
+uses-unsafe-cpows = true
+skip-if = true
+[browser_dbg_terminate-on-tab-close.js]
+uses-unsafe-cpows = true
+skip-if = true
+[browser_dbg_worker-window.js]
+skip-if = (e10s && debug) || true # Bug 1486974
\ No newline at end of file
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser2.ini
+++ /dev/null
@@ -1,169 +0,0 @@
-# Tests in this directory are split into two manifests (this and browser.ini)
-# to facilitate better chunking; see bug 1294489.
-
-[DEFAULT]
-tags = devtools
-subsuite = devtools
-skip-if = (os == 'linux' && debug && bits == 32)
-support-files =
-  addon4.xpi
-  addon5.xpi
-  addon-webext-contentscript.xpi
-  addon-source/browser_dbg_addon5/*
-  code_binary_search.coffee
-  code_binary_search.js
-  code_binary_search.map
-  code_breakpoints-break-on-last-line-of-script-on-reload.js
-  code_breakpoints-other-tabs.js
-  code_bug-896139.js
-  code_frame-script.js
-  code_function-jump-01.js
-  code_function-search-01.js
-  code_function-search-02.js
-  code_function-search-03.js
-  code_location-changes.js
-  code_listworkers-worker1.js
-  code_listworkers-worker2.js
-  code_math.js
-  code_math.map
-  code_math.min.js
-  code_math_bogus_map.js
-  code_same-line-functions.js
-  code_script-eval.js
-  code_script-switching-01.js
-  code_script-switching-02.js
-  code_test-editor-mode
-  code_ugly.js
-  code_ugly-2.js
-  code_ugly-3.js
-  code_ugly-4.js
-  code_ugly-5.js
-  code_ugly-6.js
-  code_ugly-7.js
-  code_ugly-8
-  code_ugly-8^headers^
-  code_worker-source-map.coffee
-  code_worker-source-map.js
-  code_worker-source-map.js.map
-  code_WorkerTargetActor.attach-worker1.js
-  code_WorkerTargetActor.attach-worker2.js
-  code_WorkerTargetActor.attachThread-worker.js
-  doc_binary_search.html
-  doc_breakpoints-break-on-last-line-of-script-on-reload.html
-  doc_breakpoints-other-tabs.html
-  doc_breakpoints-reload.html
-  doc_bug-896139.html
-  doc_closures.html
-  doc_closure-optimized-out.html
-  doc_breakpoint-move.html
-  doc_conditional-breakpoints.html
-  doc_domnode-variables.html
-  doc_editor-mode.html
-  doc_empty-tab-01.html
-  doc_empty-tab-02.html
-  doc_event-listeners-01.html
-  doc_event-listeners-02.html
-  doc_event-listeners-03.html
-  doc_frame-parameters.html
-  doc_function-display-name.html
-  doc_function-jump.html
-  doc_function-search.html
-  doc_iframes.html
-  doc_included-script.html
-  doc_inline-debugger-statement.html
-  doc_inline-script.html
-  doc_large-array-buffer.html
-  doc_listworkers-tab.html
-  doc_map-set.html
-  doc_minified.html
-  doc_minified_bogus_map.html
-  doc_native-event-handler.html
-  doc_no-page-sources.html
-  doc_pause-exceptions.html
-  doc_promise-get-allocation-stack.html
-  doc_promise-get-fulfillment-stack.html
-  doc_promise-get-rejection-stack.html
-  doc_promise.html
-  doc_proxy.html
-  doc_random-javascript.html
-  doc_recursion-stack.html
-  doc_scope-variable.html
-  doc_scope-variable-2.html
-  doc_scope-variable-3.html
-  doc_scope-variable-4.html
-  doc_script-eval.html
-  doc_script-bookmarklet.html
-  doc_script-switching-01.html
-  doc_script-switching-02.html
-  doc_script_webext_contentscript.html
-  doc_split-console-paused-reload.html
-  doc_step-many-statements.html
-  doc_step-out.html
-  doc_terminate-on-tab-close.html
-  doc_watch-expressions.html
-  doc_watch-expression-button.html
-  doc_whitespace-property-names.html
-  doc_with-frame.html
-  doc_worker-source-map.html
-  doc_WorkerTargetActor.attach-tab1.html
-  doc_WorkerTargetActor.attach-tab2.html
-  doc_WorkerTargetActor.attachThread-tab.html
-  head.js
-  sjs_post-page.sjs
-  sjs_random-javascript.sjs
-  testactors.js
-  !/devtools/client/shared/test/shared-head.js
-  !/devtools/client/shared/test/telemetry-test-helpers.js
-
-[browser_dbg_on-pause-raise.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug || os == "linux" # Bug 888811 & bug 891176
-[browser_dbg_optimized-out-vars.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_pause-resume.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_pause-warning.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_paused-keybindings.js]
-skip-if = e10s
-[browser_dbg_post-page.js]
-uses-unsafe-cpows = true
-[browser_dbg_progress-listener-bug.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_promises-allocation-stack.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_promises-chrome-allocation-stack.js]
-uses-unsafe-cpows = true
-skip-if = true # Bug 1177730
-[browser_dbg_promises-fulfillment-stack.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_promises-rejection-stack.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_sources-cache.js]
-uses-unsafe-cpows = true
-[browser_dbg_sources-iframe-reload.js]
-uses-unsafe-cpows = true
-skip-if = (os == "linux" && debug && bits == 64) #Bug 1455225, disable on Linux x64 debug for frequent failures
-[browser_dbg_sources-bookmarklet.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_split-console-paused-reload.js]
-skip-if = true # Bug 1288348 - previously e10s && debug
-[browser_dbg_terminate-on-tab-close.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_worker-source-map.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_worker-window.js]
-skip-if = (e10s && debug) || true # Bug 1486974
-[browser_dbg_split-console-keypress.js]
-uses-unsafe-cpows = true
-skip-if = (debug || os == "linux") # Bug 1214439
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_aaa_run_first_leaktest.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * This tests if the debugger leaks on initialization and sudden destruction.
- * You can also use this initialization format as a template for other tests.
- * If leaks happen here, there's something very, very fishy going on.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-function test() {
-  // Wait longer for this very simple test that comes first, to make sure that
-  // GC from previous tests does not interfere with the debugger suite.
-  requestLongerTimeout(2);
-
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab, aPanel]) => {
-    ok(aTab, "Should have a tab available.");
-    ok(aPanel, "Should have a debugger pane available.");
-
-    waitForSourceAndCaretAndScopes(aPanel, "-02.js", 1).then(() => {
-      resumeDebuggerThenCloseAndFinish(aPanel);
-    });
-
-    callInTab(aTab, "firstCall");
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_addon-modules-unpacked.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Make sure the add-on actor can see loaded JS Modules from an add-on
-
-const ADDON_ID = "browser_dbg_addon5@tests.mozilla.org";
-const ADDON_PATH = "addon-source/browser_dbg_addon5/";
-const ADDON_URL = getTemporaryAddonURLFromPath(ADDON_PATH);
-
-function test() {
-  Task.spawn(function* () {
-    let addon = yield addTemporaryAddon(ADDON_PATH);
-    let tab1 = yield addTab("chrome://browser_dbg_addon5/content/test.xul");
-
-    let addonDebugger = yield initAddonDebugger(ADDON_ID);
-
-    is(addonDebugger.title,
-       `Developer Tools - Test unpacked add-on with JS Modules - ${ADDON_URL}`,
-       "Saw the right toolbox title.");
-
-    // Check the inital list of sources is correct
-    let groups = yield addonDebugger.getSourceGroups();
-    is(groups[0].name, "browser_dbg_addon5@tests.mozilla.org", "Add-on code should be the first group");
-    is(groups[1].name, "chrome://global", "XUL code should be the second group");
-    is(groups.length, 2, "Should be only two groups.");
-
-    let sources = groups[0].sources;
-    is(sources.length, 3, "Should be three sources");
-    ok(sources[0].url.endsWith("/browser_dbg_addon5/bootstrap.js"), "correct url for bootstrap code");
-    is(sources[0].label, "bootstrap.js", "correct label for bootstrap code");
-    is(sources[1].url, "resource://browser_dbg_addon5/test.jsm", "correct url for addon code");
-    is(sources[1].label, "test.jsm", "correct label for addon code");
-    is(sources[2].url, "chrome://browser_dbg_addon5/content/testxul.js", "correct url for addon tab code");
-    is(sources[2].label, "testxul.js", "correct label for addon tab code");
-
-    // Load a new module and tab and check they appear in the list of sources
-    ChromeUtils.import("resource://browser_dbg_addon5/test2.jsm", {});
-    let tab2 = yield addTab("chrome://browser_dbg_addon5/content/test2.xul");
-
-    groups = yield addonDebugger.getSourceGroups();
-    is(groups[0].name, "browser_dbg_addon5@tests.mozilla.org", "Add-on code should be the first group");
-    is(groups[1].name, "chrome://global", "XUL code should be the second group");
-    is(groups.length, 2, "Should be only two groups.");
-
-    sources = groups[0].sources;
-    is(sources.length, 5, "Should be five sources");
-    ok(sources[0].url.endsWith("/browser_dbg_addon5/bootstrap.js"), "correct url for bootstrap code");
-    is(sources[0].label, "bootstrap.js", "correct label for bootstrap code");
-    is(sources[1].url, "resource://browser_dbg_addon5/test.jsm", "correct url for addon code");
-    is(sources[1].label, "test.jsm", "correct label for addon code");
-    is(sources[2].url, "chrome://browser_dbg_addon5/content/testxul.js", "correct url for addon tab code");
-    is(sources[2].label, "testxul.js", "correct label for addon tab code");
-    is(sources[3].url, "resource://browser_dbg_addon5/test2.jsm", "correct url for addon code");
-    is(sources[3].label, "test2.jsm", "correct label for addon code");
-    is(sources[4].url, "chrome://browser_dbg_addon5/content/testxul2.js", "correct url for addon tab code");
-    is(sources[4].label, "testxul2.js", "correct label for addon tab code");
-
-    Cu.unload("resource://browser_dbg_addon5/test2.jsm");
-    yield addonDebugger.destroy();
-    yield removeTab(tab1);
-    yield removeTab(tab2);
-    yield removeAddon(addon);
-    finish();
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_addon-modules.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Make sure the add-on actor can see loaded JS Modules from an add-on
-
-const ADDON_ID = "browser_dbg_addon4@tests.mozilla.org";
-const ADDON_PATH = "addon4.xpi";
-const ADDON_URL = getTemporaryAddonURLFromPath(ADDON_PATH);
-
-function test() {
-  Task.spawn(function* () {
-    let addon = yield addTemporaryAddon(ADDON_PATH);
-    let tab1 = yield addTab("chrome://browser_dbg_addon4/content/test.xul");
-
-    let addonDebugger = yield initAddonDebugger(ADDON_ID);
-
-    is(addonDebugger.title, `Developer Tools - Test add-on with JS Modules - ${ADDON_URL}`,
-       "Saw the right toolbox title.");
-
-    // Check the inital list of sources is correct
-    let groups = yield addonDebugger.getSourceGroups();
-    is(groups[0].name, "browser_dbg_addon4@tests.mozilla.org", "Add-on code should be the first group");
-    is(groups[1].name, "chrome://global", "XUL code should be the second group");
-    is(groups.length, 2, "Should be only two groups.");
-
-    let sources = groups[0].sources;
-    is(sources.length, 3, "Should be three sources");
-    ok(sources[0].url.endsWith("/addon4.xpi!/bootstrap.js"), "correct url for bootstrap code");
-    is(sources[0].label, "bootstrap.js", "correct label for bootstrap code");
-    is(sources[1].url, "resource://browser_dbg_addon4/test.jsm", "correct url for addon code");
-    is(sources[1].label, "test.jsm", "correct label for addon code");
-    is(sources[2].url, "chrome://browser_dbg_addon4/content/testxul.js", "correct url for addon tab code");
-    is(sources[2].label, "testxul.js", "correct label for addon tab code");
-
-    // Load a new module and tab and check they appear in the list of sources
-    ChromeUtils.import("resource://browser_dbg_addon4/test2.jsm", {});
-    let tab2 = yield addTab("chrome://browser_dbg_addon4/content/test2.xul");
-
-    groups = yield addonDebugger.getSourceGroups();
-    is(groups[0].name, "browser_dbg_addon4@tests.mozilla.org", "Add-on code should be the first group");
-    is(groups[1].name, "chrome://global", "XUL code should be the second group");
-    is(groups.length, 2, "Should be only two groups.");
-
-    sources = groups[0].sources;
-    is(sources.length, 5, "Should be five sources");
-    ok(sources[0].url.endsWith("/addon4.xpi!/bootstrap.js"), "correct url for bootstrap code");
-    is(sources[0].label, "bootstrap.js", "correct label for bootstrap code");
-    is(sources[1].url, "resource://browser_dbg_addon4/test.jsm", "correct url for addon code");
-    is(sources[1].label, "test.jsm", "correct label for addon code");
-    is(sources[2].url, "chrome://browser_dbg_addon4/content/testxul.js", "correct url for addon tab code");
-    is(sources[2].label, "testxul.js", "correct label for addon tab code");
-    is(sources[3].url, "resource://browser_dbg_addon4/test2.jsm", "correct url for addon code");
-    is(sources[3].label, "test2.jsm", "correct label for addon code");
-    is(sources[4].url, "chrome://browser_dbg_addon4/content/testxul2.js", "correct url for addon tab code");
-    is(sources[4].label, "testxul2.js", "correct label for addon tab code");
-
-    Cu.unload("resource://browser_dbg_addon4/test2.jsm");
-    yield addonDebugger.destroy();
-    yield removeTab(tab1);
-    yield removeTab(tab2);
-    yield removeAddon(addon);
-    finish();
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_bfcache.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Make sure that the debugger is updated with the correct sources when moving
- * back and forward in the tab.
- */
-
-const TAB_URL_1 = EXAMPLE_URL + "doc_script-switching-01.html";
-const TAB_URL_2 = EXAMPLE_URL + "doc_recursion-stack.html";
-
-var gTab, gPanel, gDebugger;
-var gSources;
-
-const test = Task.async(function* () {
-  info("Starting browser_dbg_bfcache.js's `test`.");
-
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  ([gTab, gPanel]) = yield initDebugger(TAB_URL_1, options);
-  gDebugger = gPanel.panelWin;
-  gSources = gDebugger.DebuggerView.Sources;
-
-  yield testFirstPage();
-  yield testLocationChange();
-  yield testBack();
-  yield testForward();
-  return closeDebuggerAndFinish(gPanel);
-});
-
-function testFirstPage() {
-  info("Testing first page.");
-
-  // Spin the event loop before causing the debuggee to pause, to allow
-  // this function to return first.
-  executeSoon(() => {
-    ContentTask.spawn(gTab.linkedBrowser, null, async () => {
-      content.wrappedJSObject.firstCall();
-    });
-  });
-
-  return waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1)
-    .then(validateFirstPage);
-}
-
-function testLocationChange() {
-  info("Navigating to a different page.");
-
-  return navigateActiveTabTo(gPanel,
-                             TAB_URL_2,
-                             gDebugger.EVENTS.SOURCES_ADDED)
-    .then(validateSecondPage);
-}
-
-function testBack() {
-  info("Going back.");
-
-  return navigateActiveTabInHistory(gPanel,
-                                    "back",
-                                    gDebugger.EVENTS.SOURCES_ADDED)
-    .then(validateFirstPage);
-}
-
-function testForward() {
-  info("Going forward.");
-
-  return navigateActiveTabInHistory(gPanel,
-                                    "forward",
-                                    gDebugger.EVENTS.SOURCES_ADDED)
-    .then(validateSecondPage);
-}
-
-function validateFirstPage() {
-  is(gSources.itemCount, 2,
-    "Found the expected number of sources.");
-  ok(gSources.getItemForAttachment(e => e.label == "code_script-switching-01.js"),
-    "Found the first source label.");
-  ok(gSources.getItemForAttachment(e => e.label == "code_script-switching-02.js"),
-    "Found the second source label.");
-}
-
-function validateSecondPage() {
-  is(gSources.itemCount, 1,
-    "Found the expected number of sources.");
-  ok(gSources.getItemForAttachment(e => e.label == "doc_recursion-stack.html"),
-    "Found the single source label.");
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gSources = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_break-in-anon.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Make sure anonymous eval scripts can still break with a `debugger`
- * statement
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-eval.html";
-
-function test() {
-  const options = {
-    source: EXAMPLE_URL + "code_script-eval.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab, aPanel]) => {
-    const gTab = aTab;
-    const gPanel = aPanel;
-    const gDebugger = gPanel.panelWin;
-    const gSources = gDebugger.DebuggerView.Sources;
-
-    return Task.spawn(function* () {
-      is(gSources.values.length, 1, "Should have 1 source");
-
-      callInTab(gTab, "evalSourceWithDebugger");
-      yield waitForDebuggerEvents(gPanel, gDebugger.EVENTS.SOURCE_SHOWN);
-
-      is(gSources.values.length, 2, "Should have 2 sources");
-
-      let item = gSources.getItemForAttachment(e => e.label.indexOf("SCRIPT") === 0);
-      ok(item, "Source label is incorrect.");
-      is(item.attachment.group, gDebugger.L10N.getStr("anonymousSourcesLabel"),
-         "Source group is incorrect");
-
-      yield resumeDebuggerThenCloseAndFinish(gPanel);
-    });
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_break-on-next-console.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test if 'break on next' functionality works from executions
- * in content triggered by the console in the toolbox.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-eval.html";
-
-function test() {
-  let gTab, gPanel, gDebugger;
-  let gSources, gBreakpoints, gTarget, gResumeButton, gResumeKey, gThreadClient;
-
-  let options = {
-    source: EXAMPLE_URL + "code_script-eval.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-    gTarget = gDebugger.gTarget;
-    gThreadClient = gDebugger.gThreadClient;
-    gResumeButton = gDebugger.document.getElementById("resume");
-    gResumeKey = gDebugger.document.getElementById("resumeKey");
-
-    testConsole()
-      .then(() => closeDebuggerAndFinish(gPanel));
-  });
-
-  let testConsole = Task.async(function* () {
-    info("Starting testConsole");
-
-    let oncePaused = gTarget.once("thread-paused");
-    EventUtils.sendMouseEvent({ type: "mousedown" }, gResumeButton, gDebugger);
-    let jsterm = yield getSplitConsole(gDevTools.getToolbox(gPanel.target));
-    let executed = jsterm.execute("1+1");
-    yield oncePaused;
-
-    let updatedFrame = yield waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_SCOPES);
-    let variables = gDebugger.DebuggerView.Variables;
-
-    is(variables._store.length, 3, "Correct number of scopes available");
-    is(variables.getScopeAtIndex(0).name, "With scope [Object]",
-        "Paused with correct scope (0)");
-    is(variables.getScopeAtIndex(1).name, "Block scope",
-        "Paused with correct scope (1)");
-    is(variables.getScopeAtIndex(2).name, "Global scope [Window]",
-        "Paused with correct scope (2)");
-
-    let onceResumed = gTarget.once("thread-resumed");
-    EventUtils.sendMouseEvent({ type: "mousedown" }, gResumeButton, gDebugger);
-    yield onceResumed;
-
-    yield executed;
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_break-on-next.js
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test if 'break on next' functionality works from executions
- * in content that are triggered by the page.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-eval.html";
-
-function test() {
-  let gTab, gPanel, gDebugger;
-  let gSources, gBreakpoints, gTarget, gResumeButton, gResumeKey, gThreadClient;
-
-  const options = {
-    source: EXAMPLE_URL + "code_script-eval.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-    gTarget = gDebugger.gTarget;
-    gThreadClient = gDebugger.gThreadClient;
-    gResumeButton = gDebugger.document.getElementById("resume");
-    gResumeKey = gDebugger.document.getElementById("resumeKey");
-
-    testInterval()
-      .then(testEvent)
-      .then(() => closeDebuggerAndFinish(gPanel));
-  });
-
-  // Testing an interval instead of a timeout / rAF because
-  // it's less likely to fail due to timing issues.  If the
-  // first callback happens to fire before the break request
-  // happens then we'll just get it next time.
-  let testInterval = Task.async(function* () {
-    info("Starting testInterval");
-
-    yield evalInTab(gTab, `
-      var interval = setInterval(function() {
-        return 1+1;
-      }, 100);
-    `);
-
-    let oncePaused = gTarget.once("thread-paused");
-    EventUtils.sendMouseEvent({ type: "mousedown" }, gResumeButton, gDebugger);
-    yield oncePaused;
-
-    yield waitForDebuggerEvents(gPanel, gDebugger.EVENTS.SOURCE_SHOWN);
-    let variables = gDebugger.DebuggerView.Variables;
-
-    is(variables._store.length, 3, "Correct number of scopes available");
-    is(variables.getScopeAtIndex(0).name, "Function scope [interval<]",
-        "Paused with correct scope (0)");
-    is(variables.getScopeAtIndex(1).name, "Block scope",
-        "Paused wit