Bug 1309722 - Update new debugger frontend r=me

This commit is contained in:
James Long 2016-10-19 13:24:08 -04:00
Родитель 4426150488
Коммит 8fe7d41942
19 изменённых файлов: 8645 добавлений и 10745 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -46,7 +46,7 @@ var Debugger =
/***/ 0:
/***/ function(module, exports, __webpack_require__) {
var prettyFast = __webpack_require__(438);
var prettyFast = __webpack_require__(417);
self.onmessage = function (msg) {
var _prettyPrint = prettyPrint(msg.data);
@ -100,7 +100,7 @@ var Debugger =
/***/ },
/***/ 438:
/***/ 417:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
@ -122,8 +122,8 @@ var Debugger =
}(this, function () {
"use strict";
var acorn = this.acorn || __webpack_require__(439);
var sourceMap = this.sourceMap || __webpack_require__(440);
var acorn = this.acorn || __webpack_require__(418);
var sourceMap = this.sourceMap || __webpack_require__(419);
var SourceNode = sourceMap.SourceNode;
// If any of these tokens are seen before a "[" token, we know that "[" token
@ -982,7 +982,7 @@ var Debugger =
/***/ },
/***/ 439:
/***/ 418:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Acorn is a tiny, fast JavaScript parser written in JavaScript.
@ -3642,7 +3642,7 @@ var Debugger =
/***/ },
/***/ 440:
/***/ 419:
/***/ function(module, exports, __webpack_require__) {
/*
@ -3650,14 +3650,14 @@ var Debugger =
* Licensed under the New BSD license. See LICENSE.txt or:
* http://opensource.org/licenses/BSD-3-Clause
*/
exports.SourceMapGenerator = __webpack_require__(441).SourceMapGenerator;
exports.SourceMapConsumer = __webpack_require__(447).SourceMapConsumer;
exports.SourceNode = __webpack_require__(449).SourceNode;
exports.SourceMapGenerator = __webpack_require__(420).SourceMapGenerator;
exports.SourceMapConsumer = __webpack_require__(426).SourceMapConsumer;
exports.SourceNode = __webpack_require__(428).SourceNode;
/***/ },
/***/ 441:
/***/ 420:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -3671,10 +3671,10 @@ var Debugger =
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var base64VLQ = __webpack_require__(442);
var util = __webpack_require__(444);
var ArraySet = __webpack_require__(445).ArraySet;
var MappingList = __webpack_require__(446).MappingList;
var base64VLQ = __webpack_require__(421);
var util = __webpack_require__(423);
var ArraySet = __webpack_require__(424).ArraySet;
var MappingList = __webpack_require__(425).MappingList;
/**
* An instance of the SourceMapGenerator represents a source map which is
@ -4064,7 +4064,7 @@ var Debugger =
/***/ },
/***/ 442:
/***/ 421:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4108,7 +4108,7 @@ var Debugger =
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var base64 = __webpack_require__(443);
var base64 = __webpack_require__(422);
// A single base 64 digit can contain 6 bits of data. For the base 64 variable
// length quantities we use in the source map spec, the first bit is the sign,
@ -4213,7 +4213,7 @@ var Debugger =
/***/ },
/***/ 443:
/***/ 422:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4262,7 +4262,7 @@ var Debugger =
/***/ },
/***/ 444:
/***/ 423:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4588,7 +4588,7 @@ var Debugger =
/***/ },
/***/ 445:
/***/ 424:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4602,7 +4602,7 @@ var Debugger =
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var util = __webpack_require__(444);
var util = __webpack_require__(423);
/**
* A data structure which is a combination of an array and a set. Adding a new
@ -4692,7 +4692,7 @@ var Debugger =
/***/ },
/***/ 446:
/***/ 425:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4706,7 +4706,7 @@ var Debugger =
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var util = __webpack_require__(444);
var util = __webpack_require__(423);
/**
* Determine whether mappingB is after mappingA with respect to generated
@ -4785,7 +4785,7 @@ var Debugger =
/***/ },
/***/ 447:
/***/ 426:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4799,10 +4799,10 @@ var Debugger =
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var util = __webpack_require__(444);
var binarySearch = __webpack_require__(448);
var ArraySet = __webpack_require__(445).ArraySet;
var base64VLQ = __webpack_require__(442);
var util = __webpack_require__(423);
var binarySearch = __webpack_require__(427);
var ArraySet = __webpack_require__(424).ArraySet;
var base64VLQ = __webpack_require__(421);
/**
* A SourceMapConsumer instance represents a parsed source map which we can
@ -5367,7 +5367,7 @@ var Debugger =
/***/ },
/***/ 448:
/***/ 427:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -5454,7 +5454,7 @@ var Debugger =
/***/ },
/***/ 449:
/***/ 428:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -5468,8 +5468,8 @@ var Debugger =
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var SourceMapGenerator = __webpack_require__(441).SourceMapGenerator;
var util = __webpack_require__(444);
var SourceMapGenerator = __webpack_require__(420).SourceMapGenerator;
var util = __webpack_require__(423);
// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
// operating systems these days (capturing the result).

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,61 +1,130 @@
.tabs {
font-size: 1.25em;
margin: 100px auto;
margin-bottom: 0;
width: calc(100% - 200px);
.landing-page {
flex: 1;
display: flex;
width: 100%;
height: 100%;
flex-direction: row;
}
.tabs .tab-group {
margin-top: 20px;
.landing-page .sidebar {
display: flex;
background-color: var(--theme-content-color1);
width: 200px;
height: 100%;
flex-direction: column;
}
.tabs .tab-group-title {
font-size: 1.25em;
margin: 0 0 1em 10px;
color: var(--theme-highlight-lightorange);
.landing-page .sidebar h1 {
color: white;
font-size: 24px;
margin: 0;
line-height: 30px;
font-weight: normal;
padding: 40px 20px;
}
.tabs .tab-list {
.landing-page .sidebar ul {
list-style: none;
padding: 0;
line-height: 30px;
font-size: 18px;
}
.landing-page .sidebar li {
padding: 5px 20px;
}
.landing-page .sidebar li.selected {
background: #1f2327;
}
.landing-page .sidebar li:hover {
background: #1f2327;
cursor: pointer;
}
.landing-page .sidebar li a {
color: var(--theme-comment-alt);
}
.landing-page .panel {
display: flex;
flex: 1;
height: 100%;
overflow: auto;
flex-direction: column;
}
.landing-page .panel .title {
margin: 20px 40px;
width: calc(100% - 80px);
padding: 0 20px;
font-size: 16px;
border-bottom: 1px solid #cccccc;
height: 54px;
}
.landing-page .panel h2 {
color: var(--theme-body-color);
font-weight: normal;
}
.landing-page .panel .center {
flex: 1;
display: flex;
flex-direction: column;
}
.landing-page .panel .center .center-message {
margin: 40px;
font-size: 16px;
line-height: 25px;
padding: 10px;
}
.landing-page .center a {
color: var(--theme-highlight-bluegrey);
text-decoration: none;
}
.landing-page .tab-group {
margin: 40px;
}
.landing-page .tab-list {
list-style: none;
padding: 0px;
margin: 0px;
}
.tabs .tab:first-child {
border-top: 1px solid var(--theme-splitter-color);
}
.tabs .tab {
.landing-page .tab {
border-bottom: 1px solid var(--theme-splitter-color);
padding: 10px;
font-family: sans-serif;
}
.tabs .tab:hover {
.landing-page .tab:hover {
background-color: var(--theme-toolbar-background);
cursor: pointer;
}
.tabs .tab-title {
.landing-page .tab-title {
line-height: 25px;
color: var(--theme-content-color1);
}
.tabs .tab-url {
font-size: 16px;
color: var(--theme-highlight-bluegrey);
}
.connect-message {
margin: 20px;
padding: 50px 100px;
text-align: center;
color: #9a9a9a;
.landing-page .tab-url {
color: var(--theme-comment);
}
.connect-message.not-connected {
border: 1px solid #dddddd;
background-color: #fbfbfb;
color: #9a9a9a;
.landing-page .panel .center .footer-note {
flex: 1;
padding: 50px;
font-size: 14px;
color: var(--theme-comment);
bottom: 0;
position: absolute;
}
/* vim:set ts=2 sw=2 sts=2 et: */
@ -88,6 +157,7 @@ body {
.debugger {
display: flex;
flex: 1;
height: 100%;
}
.center-pane {
@ -126,6 +196,23 @@ body {
margin-top: 25px;
margin-right: 20px;
}
.welcomebox {
width: calc(100% - 1px);
/* Offsetting it by 30px for the sources-header area */
height: calc(100% - 30px);
position: absolute;
top: 30px;
left: 0;
padding: 50px 0;
text-align: center;
font-size: 1.25em;
color: var(--theme-comment-alt);
background-color: var(--theme-tab-toolbar-background);
font-weight: lighter;
z-index: 100;
}
/* 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
@ -258,6 +345,11 @@ body {
overflow: hidden;
}
.sources-panel * {
-moz-user-select: none;
user-select: none;
}
.sources-header {
height: 30px;
border-bottom: 1px solid var(--theme-splitter-color);
@ -267,10 +359,12 @@ body {
display: flex;
align-items: baseline;
justify-content: space-between;
-moz-user-select: none;
user-select: none;
}
.sources-header-info {
font-size: 0.7em;
font-size: 12px;
color: var(--theme-comment-alt);
font-weight: lighter;
white-space: nowrap;
@ -398,15 +492,22 @@ ul.sources-list {
position: absolute;
bottom: 0;
left: 0;
right: 0;
right: 1px;
opacity: 1;
z-index: 100;
-moz-user-select: none;
user-select: none;
}
.source-footer .command-bar {
float: right;
}
.source-footer .command-bar * {
-moz-user-select: none;
user-select: none;
}
.command-bar > span {
cursor: pointer;
margin-right: 0.7em;
@ -434,6 +535,52 @@ ul.sources-list {
padding-left: 4px;
font-size: 10px;
}
.search-bar {
width: calc(100% - 1px);
height: 40px;
background: white;
border-bottom: 1px solid var(--theme-splitter-color);
display: flex;
}
.search-bar svg {
width: 16px;
}
.search-bar i {
display: block;
padding: 13px 0 0 13px;
}
.search-bar input {
border: none;
line-height: 30px;
font-size: 14px;
color: var(--theme-comment);
width: calc(100% - 38px);
padding-left: 10px;
display: flex;
padding-right: 100px;
flex: 1;
}
.search-bar input::placeholder {
color: var(--theme-body-color-inactive);
}
.search-bar input:focus {
outline-width: 0;
}
.search-bar input.empty {
color: var(--theme-highlight-orange);
}
.search-bar .summary {
line-height: 40px;
padding-right: 10px;
color: var(--theme-body-color-inactive);
}
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
@ -461,9 +608,9 @@ ul.sources-list {
.editor.new-breakpoint svg {
fill: var(--theme-selection-background);
width: 60px;
height: 12px;
height: 14px;
position: absolute;
top: 0;
top: 0px;
right: -4px;
}
@ -471,6 +618,10 @@ ul.sources-list {
opacity: 0.3;
}
.search-bar ~ .editor-mount {
height: calc(100% - 58px);
}
.editor-mount,
.CodeMirror {
width: 100%;
@ -480,6 +631,7 @@ ul.sources-list {
.CodeMirror-linenumber {
font-size: 11px;
line-height: 14px;
}
/* set the linenumber white when there is a breakpoint */
@ -492,6 +644,11 @@ ul.sources-list {
z-index: 0;
}
.editor-wrapper .CodeMirror-line {
font-size: 11px;
line-height: 14px;
}
.debug-line .CodeMirror-line {
background-color: var(--breakpoint-active-color) !important;
}
@ -526,6 +683,8 @@ ul.sources-list {
background-color: var(--theme-tab-toolbar-background);
font-weight: lighter;
z-index: 100;
-moz-user-select: none;
user-select: none;
}
.close-btn path {
fill: var(--theme-body-color);
@ -553,18 +712,28 @@ ul.sources-list {
.close-btn .close:hover path {
fill: white;
}
.breakpoints-list * {
-moz-user-select: none;
user-select: none;
}
.breakpoints-list .breakpoint {
font-size: 12px;
color: var(--theme-content-color1);
margin: 0.25em 0;
padding: 0.25em 0;
padding: 0.5em 1px;
line-height: 1em;
position: relative;
border-left: 4px solid transparent;
}
.breakpoints-list .breakpoint:last-of-type {
padding-bottom: 0.45em;
}
.breakpoints-list .breakpoint.paused {
background-color: var(--theme-toolbar-background-alt);
border-color: var(--breakpoint-active-color);
}
.breakpoints-list .breakpoint.disabled .breakpoint-label {
@ -577,8 +746,18 @@ ul.sources-list {
background-color: var(--theme-toolbar-background);
}
.breakpoints-list .breakpoint.paused:hover {
border-color: var(--breakpoint-active-color-hover);
}
.breakpoints-list .breakpoint-checkbox {
margin-left: 0;
}
.breakpoints-list .breakpoint-label {
display: inline-block;
padding-left: 2px;
padding-bottom: 4px;
}
.breakpoints-list .pause-indicator {
@ -588,7 +767,7 @@ ul.sources-list {
.breakpoint-snippet {
color: var(--theme-comment);
padding-left: 20px;
padding-left: 18px;
}
.breakpoint .close-btn {
@ -859,7 +1038,6 @@ ul.sources-list {
.scopes-list .tree-node {
overflow: hidden;
}
.frames ul {
list-style: none;
margin: 0;
@ -868,11 +1046,16 @@ ul.sources-list {
.frames ul li {
cursor: pointer;
padding: 10px;
padding: 7px 10px 7px 21px;
clear: both;
overflow: hidden;
}
.frames ul li * {
-moz-user-select: none;
user-select: none;
}
.frames ul li:nth-of-type(2n) {
background-color: var(--theme-tab-toolbar-background);
}
@ -925,7 +1108,8 @@ ul.sources-list {
}
.accordion ._content {
border-bottom: 1px solid var(--theme-splitter-color);;
border-bottom: 1px solid var(--theme-splitter-color);
font-size: 12px;
}
.right-sidebar {
display: flex;
@ -934,6 +1118,11 @@ ul.sources-list {
white-space: nowrap;
}
.right-siderbar * {
-moz-user-select: none;
user-select: none;
}
.right-sidebar .accordion {
overflow-y: auto;
overflow-x: hidden;
@ -945,7 +1134,7 @@ ul.sources-list {
.command-bar {
height: 30px;
padding: 8px 5px 10px 10px;
padding: 8px 5px 10px 1px;
}
.command-bar > span {
@ -998,6 +1187,11 @@ span.pause-exceptions.all {
flex: 1;
}
.source-header * {
-moz-user-select: none;
user-select: none;
}
.source-tabs {
width: calc(100% - 30px);
overflow: hidden;
@ -1093,6 +1287,11 @@ span.pause-exceptions.all {
padding: 20px;
}
.autocomplete .results * {
-moz-user-select: none;
user-select: none;
}
.autocomplete ul {
list-style: none;
width: 100%;

Просмотреть файл

@ -27,16 +27,17 @@ support-files =
[browser_dbg-breaking.js]
[browser_dbg-breaking-from-console.js]
[browser_dbg-call-stack.js]
[browser_dbg-chrome-create.js]
[browser_dbg-chrome-debugging.js]
[browser_dbg-console.js]
[browser_dbg-debugger-buttons.js]
[browser_dbg-editor-gutter.js]
[browser_dbg-editor-mode.js]
[browser_dbg-editor-select.js]
[browser_dbg-editor-highlight.js]
[browser_dbg-call-stack.js]
[browser_dbg-pause-exceptions.js]
[browser_dbg-chrome-create.js]
[browser_dbg-chrome-debugging.js]
[browser_dbg-iframes.js]
[browser_dbg-debugger-buttons.js]
[browser_dbg_keyboard-shortcuts.js]
[browser_dbg-pause-exceptions.js]
[browser_dbg-navigation.js]
[browser_dbg-console.js]
[browser_dbg-sourcemaps.js]

Просмотреть файл

@ -4,7 +4,7 @@
// Tests the breakpoints are hit in various situations.
add_task(function* () {
const dbg = yield initDebugger("doc-scripts.html", "scripts.html");
const dbg = yield initDebugger("doc-scripts.html");
const { selectors: { getSelectedSource }, getState } = dbg;
// Make sure we can set a top-level breakpoint and it will be hit on

Просмотреть файл

@ -16,10 +16,7 @@ function isFrameSelected(dbg, index, title) {
}
add_task(function* () {
const dbg = yield initDebugger(
"doc-script-switching.html",
"script-switching-01.js"
);
const dbg = yield initDebugger("doc-script-switching.html");
toggleCallStack(dbg);

Просмотреть файл

@ -25,10 +25,7 @@ function clickStepOut(dbg) {
* 5. stepUp at the end of a function
*/
add_task(function* () {
const dbg = yield initDebugger(
"doc-debugger-statements.html",
"debugger-statements.html"
);
const dbg = yield initDebugger("doc-debugger-statements.html");
yield reload(dbg);
yield waitForPaused(dbg);

Просмотреть файл

@ -22,7 +22,7 @@ function assertEditorBreakpoint(dbg, line, shouldExist) {
}
add_task(function* () {
const dbg = yield initDebugger("doc-scripts.html", "simple1.js");
const dbg = yield initDebugger("doc-scripts.html");
const { selectors: { getBreakpoints, getBreakpoint }, getState } = dbg;
const source = findSource(dbg, "simple1.js");

Просмотреть файл

@ -34,7 +34,6 @@ add_task(function* () {
// Test jumping to a line in a source that exists but hasn't been
// loaded yet.
yield waitForSources(dbg, "simple1.js");
selectSource(dbg, "simple1.js", 6);
// Make sure the source is in the loading state, wait for it to be

Просмотреть файл

@ -4,10 +4,7 @@
// Tests that the editor sets the correct mode for different file
// types
add_task(function* () {
const dbg = yield initDebugger(
"doc-scripts.html",
"simple1.js", "doc-scripts.html"
);
const dbg = yield initDebugger("doc-scripts.html");
yield selectSource(dbg, "simple1.js");
is(dbg.win.cm.getOption("mode").name, "javascript", "Mode is correct");

Просмотреть файл

@ -17,10 +17,7 @@ add_task(function* () {
// fix a frequent failure allow a longer timeout.
requestLongerTimeout(2);
const dbg = yield initDebugger(
"doc-scripts.html",
"simple1.js", "simple2.js", "long.js"
);
const dbg = yield initDebugger("doc-scripts.html");
const { selectors: { getSelectedSource }, getState } = dbg;
const simple1 = findSource(dbg, "simple1.js");
const simple2 = findSource(dbg, "simple2.js");

Просмотреть файл

@ -7,7 +7,7 @@
* 2. pause in the iframe
*/
add_task(function* () {
const dbg = yield initDebugger("doc-iframes.html", "iframes.html");
const dbg = yield initDebugger("doc-iframes.html");
// test pausing in the main thread
yield reload(dbg);

Просмотреть файл

@ -17,7 +17,7 @@ function caughtException() {
4. skip a caught error
*/
add_task(function* () {
const dbg = yield initDebugger("doc-exceptions.html", "exceptions.js");
const dbg = yield initDebugger("doc-exceptions.html");
// test skipping an uncaught exception
yield togglePauseOnExceptions(dbg, false, false);

Просмотреть файл

@ -26,10 +26,7 @@ function pressStepOut(dbg) {
}
add_task(function*() {
const dbg = yield initDebugger(
"doc-debugger-statements.html",
"debugger-statements.html"
);
const dbg = yield initDebugger("doc-debugger-statements.html");
yield reload(dbg);
yield waitForPaused(dbg);

Просмотреть файл

@ -54,6 +54,12 @@
if(opts.extra) {
output(times2(3));
}
window.keepMeAlive = function() {
// This function exists to make sure this script is never garbage
// collected.
return 1;
}
/***/ },

Просмотреть файл

@ -1 +1 @@
{"version":3,"sources":["webpack:///webpack/bootstrap 54b46cf0214c369e95aa","webpack:///./entry.js","webpack:///./times2.js","webpack:///./output.js","webpack:///./opts.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA,QAAO,SAAS;AAChB;;AAEA;AACA;;AAEA;AACA;AACA;;;;;;;ACTA;AACA;AACA;;;;;;;ACFA;AACA;AACA;;AAEA,mBAAkB;;;;;;;ACJlB;AACA;AACA","file":"bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 54b46cf0214c369e95aa\n **/","const times2 = require(\"./times2\");\nconst { output } = require(\"./output\");\nconst opts = require(\"./opts\");\n\noutput(times2(1));\noutput(times2(2));\n\nif(opts.extra) {\n output(times2(3));\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./entry.js\n ** module id = 0\n ** module chunks = 0\n **/","module.exports = function(x) {\n return x * 2;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./times2.js\n ** module id = 1\n ** module chunks = 0\n **/","function output(str) {\n console.log(str);\n}\n\nmodule.exports = { output };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./output.js\n ** module id = 2\n ** module chunks = 0\n **/","module.exports = {\n extra: true\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./opts.js\n ** module id = 3\n ** module chunks = 0\n **/"],"sourceRoot":""}
{"version":3,"sources":["webpack:///webpack/bootstrap 2cf3c8b169eb23f03776","webpack:///./entry.js","webpack:///./times2.js","webpack:///./output.js","webpack:///./opts.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA,QAAO,SAAS;AAChB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACfA;AACA;AACA;;;;;;;ACFA;AACA;AACA;;AAEA,mBAAkB;;;;;;;ACJlB;AACA;AACA","file":"bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 2cf3c8b169eb23f03776\n **/","const times2 = require(\"./times2\");\nconst { output } = require(\"./output\");\nconst opts = require(\"./opts\");\n\noutput(times2(1));\noutput(times2(2));\n\nif(opts.extra) {\n output(times2(3));\n}\n\nwindow.keepMeAlive = function() {\n // This function exists to make sure this script is never garbage\n // collected.\n return 1;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./entry.js\n ** module id = 0\n ** module chunks = 0\n **/","module.exports = function(x) {\n return x * 2;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./times2.js\n ** module id = 1\n ** module chunks = 0\n **/","function output(str) {\n console.log(str);\n}\n\nmodule.exports = { output };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./output.js\n ** module id = 2\n ** module chunks = 0\n **/","module.exports = {\n extra: true\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./opts.js\n ** module id = 3\n ** module chunks = 0\n **/"],"sourceRoot":""}

Просмотреть файл

@ -8,3 +8,9 @@ output(times2(2));
if(opts.extra) {
output(times2(3));
}
window.keepMeAlive = function() {
// This function exists to make sure this script is never garbage
// collected.
return 1;
}

Просмотреть файл

@ -300,9 +300,7 @@ function createDebuggerContext(toolbox) {
function initDebugger(url, ...sources) {
return Task.spawn(function* () {
const toolbox = yield openNewTabAndToolbox(EXAMPLE_URL + url, "jsdebugger");
const dbg = createDebuggerContext(toolbox);
yield waitForSources(dbg, ...sources);
return dbg;
return createDebuggerContext(toolbox);
});
};