-
Notifications
You must be signed in to change notification settings - Fork 751
Show mapped names in scopes bindings #3817
Show mapped names in scopes bindings #3817
Conversation
src/utils/parser/getScopes.js
Outdated
| }); | ||
| } | ||
|
|
||
| function _parseJSScopes(source: Source) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whey do we need to find scopes when the babel paths have a scope property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need position/references of every name in particular scope. So we can match these with source maps original names.
d512b2a to
13b0a49
Compare
Codecov Report
@@ Coverage Diff @@
## master #3817 +/- ##
==========================================
- Coverage 54.79% 49.09% -5.71%
==========================================
Files 130 129 -1
Lines 5075 4986 -89
Branches 1050 1030 -20
==========================================
- Hits 2781 2448 -333
- Misses 2294 2538 +244
Continue to review full report at Codecov.
|
13b0a49 to
6bac45f
Compare
codehag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work. i reviewed to the best of my ability, let me know if you have questions!
src/actions/ast.js
Outdated
| } | ||
|
|
||
| // FIXME parse expression to AST and transform original identifiers. | ||
| const m = /^([$_A-Za-z0-9]+)/.exec(expression); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is m? lets use a more descriptive name here
also the regex might just be /^(\w)/ if we are ok with underscores
src/actions/ast.js
Outdated
| let generatedName: string = ""; | ||
| const foundScope = generatedScopes.some(s => { | ||
| if (originalName in s.bindings) { | ||
| generatedName = s.bindings[originalName]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some terminates after the first match --- if i got it right, then probably what we want is a find
// this is a guess. im not clear on how `if (.. in ..)` works,
// but my guess is that it is checking a property on an object with the string
// value of originalName.
// goal here is clarity
const foundScope = generatedScopes.find(s => s.bindings[originalName])
const generatedName = foundScope.bindings[originalName];
src/actions/ast.js
Outdated
| return expression; | ||
| } | ||
|
|
||
| return generatedName + expression.substring(originalName.length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two things:
-
the substring of expression -- what is expression? do we perhaps want to search the expression, rather than taking a certain length of the expression? what are we filtering out here? what is meaningful here is really the question im asking myself
-
lets split this up so we are not doing so much in one line
const substring = expression.substring(originalName.length);
return `${generatedName}${substring}`;i used string interpolation, but the + is of course also fine
src/actions/ast.js
Outdated
| const { sourceId } = generatedLocation; | ||
| await dispatch(ensureParserHasSourceText(sourceId)); | ||
|
|
||
| return (0, parser.getScopes)(generatedLocation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a lot to unpack here. what makes me a bit uneasy, is we do not see what is happening from this line. we should be more explicit that this is a higher order function, how the arguments are applied, and move this block out of the return statement
return _HOF(generatedLocation); // obviously dont call it this
}
// ...
function _HOF(generatedLocation) {
return (...args) => // this is more declarative
parser.getScopes(...args)
.then( ... // the rest of the code as you have it
}
src/actions/ast.js
Outdated
| import type { ThunkArgs } from "./types"; | ||
| import type { AstLocation } from "../utils/parser"; | ||
|
|
||
| async function _fixExpression( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix is a bit ambiguous -- it can mean to fasten, to set into place, or it can mean to correct. correct is also problematic because it suggests that there has been some sort of corruption of the data -- perhaps better is getSourcemapedExpression ?
src/utils/parser/getScopes.js
Outdated
| ) { | ||
| if (isNode(declaratorId, "Identifier")) { | ||
| targetScope.names[declaratorId.name] = { kind, refs: [] }; | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't strictly need this return, since the rest of the body is else statements. on the other hand we can remove else and just use if statements with returns
src/utils/parser/getScopes.js
Outdated
| name: string, | ||
| loc: BabelLocation | ||
| ) { | ||
| for (let s = scope; s; s = s.parent) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is pretty hard to read, we could again do a recursive loop (which is a matter of taste) or add a comment explaining that we are traversing up the parents of the scope
function _recordIdentifierPosition(scope, name, loc) {
function _recurseParentTree(_scope) {
if (!s.names[name]) {
return;
}
_scope.names[name].refs.push(loc.start);
return _recurseParentTree(_scope.parent);
}
return _recurseParentTree(scope);
}
src/utils/parser/getScopes.js
Outdated
| case "let": | ||
| case "const": | ||
| case "param": | ||
| bindings[n] = scope.names[n].refs.map(location => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think i have reviewed a very similar piece of code here: https://github.com/devtools-html/debugger.html/pull/3852/files/e0f9e89e7ee904fbd1d1a17a0d801e8f7a1965dc#diff-dcf4c6f392912b09dabbbf7f6d2436b4
rather than copying this over, maybe check there first -- the same comment apply here
src/utils/parser/getScopes.js
Outdated
|
|
||
| function _parseJSScopes(source: Source) { | ||
| let parent: TempScope = _createTempScope("Global", null, null); | ||
| let savedParents: WeakMap<NodePath, TempScope> = new WeakMap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this never gets reassigned; can be a const
src/utils/parser/getScopes.js
Outdated
| } | ||
| return node.kind === "let" || node.kind === "const"; | ||
| }); | ||
| let scope = parent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the comments written here: https://github.com/devtools-html/debugger.html/pull/3852/files/e0f9e89e7ee904fbd1d1a17a0d801e8f7a1965dc#diff-dcf4c6f392912b09dabbbf7f6d2436b4
can also apply here
602bc51 to
23cadad
Compare
23cadad to
1c586aa
Compare
1c586aa to
b7801e9
Compare
|
Hey @yurydelendik I did a quick rebase and started a mochitest. I think the fixtures could be used in map-bindings to do an end to end test there too |
|
one quick reaction is that it would be nice to move many of these utils to the package as well so that we keep all of the mapping logic in one place and can reasonably suggest that the code folks use it for remote debugging |
b7801e9 to
3860328
Compare
3860328 to
b27f9b0
Compare
jasonLaster
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good.
| // // assertPausedLocation(dbg); | ||
| // | ||
| // await resume(dbg); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could use a bit of work :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me π
| } | ||
| return extendScope(scope, generatedScopes, 0); | ||
| }); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, but i'd prefer async/await here:
const astScopes = await getScopes(location)
const generatedScopes = await sourceMaps.getLocationScopes(location, astScopes);
if (!generatedScopes) {
return scope;
}
return extendScope(scope, generatedScopes, 0);| parent: extendScope(scope.parent, generatedScopes, index + 1), | ||
| sourceBindings: generatedScopes[index].bindings | ||
| }); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recursion, nice :P
b27f9b0 to
6dd42aa
Compare
| })); | ||
| } | ||
|
|
||
| function getSourceBindingVariables( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd be nice to have unit test for this
6dd42aa to
de94817
Compare
|
saw this error in the tests, which is fine because we're working on it separately |
jasonLaster
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!
update feature flags Preview: Show numbers inside a tooltip (firefox-devtools#4164) bump mochii Update devtools package Preview: Show numbers inside a tooltip fix the failing pending breakpoints tests (firefox-devtools#4175) Switch Scopes form PropTypes to Flow Props (firefox-devtools#4180) No domain (firefox-devtools#4159) Adding "Add condition" to breakpoints context menu (firefox-devtools#4157) Don't show "No sources" hint if sources panel is hidden (firefox-devtools#4179) * Don't show "No sources" hint if sources panel is hidden * Don't hide PrimaryPane components via css * fix linting error * remove unused import Cleanup addbreakpoints (firefox-devtools#4184) Show mapped names in scopes bindings (firefox-devtools#3817) Flow types (firefox-devtools#4197) * Fix flow error Footer * Fix flow error Breakpint, Breakpoints Fix breakpoint jumping (firefox-devtools#4191) Validate expression syntax (firefox-devtools#4114) * validate expressions * add missing test * bump mochii Fix ESLint Dependencies from Fresh Install (firefox-devtools#4178) * Add dependencies for linting * Fix linting errors in master * Fix package.json lint errors Fix firefox-devtools#4043 - Change localization note and errorLoadingText (firefox-devtools#4058) Fix linting warnings (firefox-devtools#4204) Small style improvements on breakpoint and watch expression (firefox-devtools#4057) * PR#4057 - PART1: [breakpoint] small style improvements * PR#4057 - PART2: [watch expression] small style improvements 9-27 update (firefox-devtools#4193) Shortcuts style tweak (firefox-devtools#4202) Scroll bar is not ignored in vertical mode calculations (firefox-devtools#4127) Bump react to 15.6.2 (firefox-devtools#4160) Upgrade tree component (firefox-devtools#4215) Revert "Upgrade tree component (firefox-devtools#4215)" (firefox-devtools#4224) This reverts commit 179582c. Switch Popover PropTypes to flow props (firefox-devtools#4227) Fix source tabs not lining up with file tabs (firefox-devtools#4139) memoize loading (firefox-devtools#4216) Issue firefox-devtools#3966: Show small values inside tooltip (firefox-devtools#4218) add line about vulnerabilities (firefox-devtools#4231) Fix responsive issue on WelcomeBox (firefox-devtools#4119) remove paused class (firefox-devtools#4235) Fix webpack icon matching (firefox-devtools#4240) bump 9-29 (firefox-devtools#4214) * bump 9-29 * Revert "Upgrade tree component (firefox-devtools#4215)" This reverts commit 179582c. * assets Update devtools-source-map to the latest version π (firefox-devtools#4222) * fix(package): update devtools-source-map to version 0.14.2 * fix update script * bump yarn Fix some lingering POE + Exception bugs (firefox-devtools#4225) firefox doesn't like fit-content (firefox-devtools#4219) Disables updateScopeBindings for wasm source maps. (firefox-devtools#4245) React preview (firefox-devtools#4228) Moved workers to their own Worker directory. (firefox-devtools#4230) Show the full url of a file in the source tab tooltip (firefox-devtools#4203) (firefox-devtools#4226) Fixed Webpack Alignment (firefox-devtools#4250) AST Test (firefox-devtools#4249) remove unnecessary line Fix 4246 - Prevent validateDOMNesting warning (firefox-devtools#4247) remove mocha (firefox-devtools#4254) Claim an issue (firefox-devtools#4255) Fix some react test warnings (firefox-devtools#4248) Adds readme with debugger.html version information to mc. Fix prop-type warnings (firefox-devtools#4257) * Add separate prop-types dependency Using prop types from the React repo has been deprecated. * Alphabetize dependencies and remove duplicates Remove usage of create factory (firefox-devtools#4260) Lint equality (firefox-devtools#4278) * Updated text after equality linting * clean up Migrate ManagedTree proptypes to flow (firefox-devtools#4272) Add Command Slash Shortcut (firefox-devtools#4265) Closes firefox-devtools#4213 Stop breakpoint label click from toggling breakpoint (firefox-devtools#4269) Addresses firefox-devtools#4262 Provides the primary purpose of linking to the breakpoint's location in source. Extract temp variables for wrapped components in their tests (firefox-devtools#4279) [firefox-devtools#4270] Add tests for DevToolsUtils (firefox-devtools#4271) Optimize addToTree function. (firefox-devtools#4263) Fix one case of different lodash import format (firefox-devtools#4289) Make keyboard shortcuts button more specific and localized (firefox-devtools#4293) Fixing source-documents linting error (firefox-devtools#4290) Fix 4261 - Sort breakpoints by line number (firefox-devtools#4264) * Fix 4261 - Sort breakpoints by line number * Fix flow issues * Use lodash's sortBy for breakpoint sorting Remove object.assign from selectors.js close firefox-devtools#4267 (firefox-devtools#4268) Removes unneeded SVG DOM elements for source tree arrows. (firefox-devtools#4283) Added step over functionality for yield (firefox-devtools#4232) (firefox-devtools#4276) * Added step over functionality for yield (firefox-devtools#4232) * Consistent parser steps naming and generators fixture Proposal for closing firefox-devtools#3172 (firefox-devtools#4266) Updating docs (firefox-devtools#4298) Support framework frames for Preact (firefox-devtools#4296) Attempt to reduce intermittent failures for wasm-sourcemaps test. (firefox-devtools#4305) Fix Source Tree padding left (firefox-devtools#4303) * Fix Source Tree padding left * change to match the top ooutline spacing Change component function binding to class properties (firefox-devtools#4302) show mapped names in watch expressions (firefox-devtools#4206) - unifies right click "Copy source URI" for tree view & tab view (firefox-devtools#4325) bump lock file (firefox-devtools#4317) Release (10/6) (firefox-devtools#4322) Protect Worker and Browser Content Toolboxes (firefox-devtools#4331) Use Flow for Proptype checking in Source Tree Fix flow error (wip) Show class functions in the outline! (firefox-devtools#4286) WIP - Fix Secondary Panes Scroll Bar (firefox-devtools#4275) Simplify Editor LifeCycle (firefox-devtools#4301) Align empty message in Source Tab (firefox-devtools#4337) Remove last vestige of devtools.debugger.client-source-maps-enabled (firefox-devtools#4339) Fixed issue firefox-devtools#4291 (firefox-devtools#4340) Update travis MC commit (firefox-devtools#4335) Make alt click expand/collapse all the nodes cleanup ... Debugger Release (firefox-devtools#4341) Replace lodash find with native Array::find. Fixes firefox-devtools#4343. (firefox-devtools#4344) add a GotoLineModal (firefox-devtools#4323) This commit adds a gotoline modal/functionality triggered with `Cmd+:` (`CtrlOrCmd+Shift+;`) in the main debugger source window. A string that cannot be `parseInt()`'d is a noop. A number higher than the number of lines in the file will go to the end of the file. Upgrade Launchpad (firefox-devtools#4332) Improve maintainer experience (firefox-devtools#4352) Update sources arrow (firefox-devtools#4351) fix browser toolbox issues (firefox-devtools#4347) add getDomain tst (firefox-devtools#4356) Tidies up reducer comments (firefox-devtools#4354) modal height and position changed (firefox-devtools#4277) travis bump (firefox-devtools#4358) Improve triaging docs (firefox-devtools#4321) Attempt to address "Debugger.Frame is not live". [SourceTree] Set root directory (firefox-devtools#4363) * Preview: Show numbers inside a tooltip (firefox-devtools#4164) * initial commit * resolved conflicts in src/actions/ui.js and updated debugger.properties and SourcesTree.js based on flodolo and jasonLaster feedback * Update debugger.properties fix key remove svgs Update Module Manifest Update Module Manifest Update Module Manifest Update Module Manifest Update Module Manifest Update Module Manifest Update Release (3) Update Release (3) Removed tabs + button (firefox-devtools#4367) * Removed tabs + button Issue firefox-devtools#4312 Removed: - import of formatKeyShortcut - onclick - render newButton method Kept: SVG plus icon L10N "sourceTabs.newTabButtonTooltip" key value pair * Removed tabs + button Issue firefox-devtools#4312 Removed: - import of formatKeyShortcut - onclick - render newButton method - debugger.properties sourceTabs.newTabButtonTooltip Kept: SVG plus icon add docs on merge conflicts (firefox-devtools#4365) File search reducer (firefox-devtools#4368) Fixes mis-aligned tooltip (firefox-devtools#4370) * Fixes mis-aligned tooltip * tweaks Fix Empty Lines off by one issue (firefox-devtools#4361) get display name and pass it to Popup.js (firefox-devtools#4357) small prettier changes (firefox-devtools#4364) Adds L10N for previously hardcoded keybindings (firefox-devtools#4378) * Adds L10N for previously hardcoded keybindings * Updates keybindings as requested by owner Update Release (10-13) (firefox-devtools#4380) add shortcuts modal in vertical mode (firefox-devtools#4288) (firefox-devtools#4375) Update Shortcuts button (firefox-devtools#4382) docs most-common-issues (firefox-devtools#4295) Use a monospace font for editor line numbers (firefox-devtools#4391) Set layout change Cleanup babel (firefox-devtools#4404) Adds flow types to the Scope declaration. (firefox-devtools#4405) Synchronize smoke test for browser content toolbox from m-c (firefox-devtools#4408) Update mochii to the latest version π (firefox-devtools#4414) Converted blackBox/prettyPrint SVG's to CSS (firefox-devtools#4386) Revert "Use a monospace font for editor line numbers" (firefox-devtools#4416) This reverts commit 2544fc1. Fix "3" expressions Fix firefox-devtools#4397 - Don't allow context menu when a line is empty π¨: Rework `SourceSearch` into `SourcesModal` (firefox-devtools#4398) Keeps focus on input field (firefox-devtools#4423) add layout test (firefox-devtools#4415) Change port 9000 default to 8116 default (firefox-devtools#4434) Scroll to column (firefox-devtools#4143) * fix issue with the line not highlighting in the editor * undo some changes to test * fix * switch to watForLoaded * flash line all ways * fix the conditional breakpoint panel mochitest * if there is no selected location bail early, fix a mochitest * fix mochitests, cleanup index * fix the dbg-tabs mochitest * fix the breakpoint visible mochitest issue * fix the failing unit tests * stop nesting the location info * more cleanups Upgrade flow (firefox-devtools#4433) * Upgrade Flow * Use `static` properties for `defaultProps` Flow uses the defaultProps static property to type the default props. * Convert a set of components over to the new Flow syntax * Remove a usage of 'createFactory' * Convert another batch of components over to the new Flow syntax * Convert yet another batch of components over to the new Flow syntax * Remove unused file This file was originally removed in 6ba9b0b. However, while merging in master in e60cedd, I accidentally added the file back. * Don't type check devtools-reps * Update ref for the ConditionalPanel Per the Flow docs (https://flow.org/en/docs/react/refs/), we need to explicitly set the type of the ref and ensure that it is nullable. * Convert more files to the new Flow syntax * Update the last items for the new Flow syntax * Only ignore the object-inspector So that we can still import its types. * Change flow types to use primitive values Support framework frames for Marko (firefox-devtools#4430) * added marko to library frames * code simplified * refactoring library map * moving great before react fix bug where the line being 0 returns a falsy (firefox-devtools#4445) * fix bug where the line being 0 returns a falsy and does not cause the line to flash * use isLoaded util update 10-17-2017 (firefox-devtools#4400) * update 10-17-2017 * update according to jlast's comments * fix lint bump yarn (firefox-devtools#4442) Undo string change to editor.addConditionalBreakpoint (firefox-devtools#4448) Working class and imports finder (firefox-devtools#4329) 10/13 2nd release (firefox-devtools#4447) support framework frames for aframe (firefox-devtools#4458) Fix warnings for var usage (firefox-devtools#4456) bump launchpad (firefox-devtools#4452) add support framework frames for Nuxt.js (firefox-devtools#2980) (firefox-devtools#4460) Add Jest Cases Fix links in debugging-the-debugger page Fix links in getting-setup page Fix links in getting-setup page 1 Blackboxed sources distinguished by icon in source tree (firefox-devtools#4441) Fixes 3846 Source Tabs and Gutter Column Don't Line Up (firefox-devtools#4427) * Update PaneToggle.css * Update Tabs.css * fix for dynamic width * error check for no element * moving ui related utilities to utils/ui file * adding export to each function Update README.md fix firefox-devtools#4471 - expand the right sidebar on pausing at breakpoint event stopped for context menu for non firefox browsers event prevent default moved Add next.js to framework frames (firefox-devtools#4476) Converted Source Tree SVG's (including Blackbox) to images using CSS styles (firefox-devtools#4350) (firefox-devtools#4477) add the computed property to allow differentiating between computed and uncomputed memberexpressions fix flow move the func to a utility file added tests fix tests Fix footer background length in dark theme Highlight errors in editor fix css linting errors cleanup Make error background color lighter refactoring fix getting the lineNo from CoideMirror (firefox-devtools#4466) Move workflow to pr docs (wip) Refactor pause actions (firefox-devtools#4439) * Update Pause Semantics [Issue-4486]-Changing the overflow rule of secondaryPanel to prβ¦ (firefox-devtools#4487) QuickOpenModal (firefox-devtools#4464) Fix cross-configuration problems (firefox-devtools#4475) * Add gitattributes * fix: Multi-platform and configuration issues This configures all systems to checkout and use LF line endings. The jest test system also runs without colors by default now. This allows the tests to pass in any environment regardless of color scheme. * tweaks bump mochi Close ConditionalPanel on blur [Preview] Some lines are incorrectly marked as out of scope Add travis notifications π: Fix the quick-open mochitest There were some race issues with the quick open mochitest assertions that this cleared up. π: Add some mochitest debugging tips. Added some tips to the mochitest debugging docs based on experience debugging race issue. Also Prettier fixed some things. tweaks Weekly Post - 10-24 (firefox-devtools#4494) Remove createClass and Proptypes warning (firefox-devtools#4510) (firefox-devtools#4350) Converted Step Button SVG's to images using CSS Styles (firefox-devtools#4502) notify on failure (firefox-devtools#4511) Fixes firefox-devtools#4505 - Convert file SVG to image (firefox-devtools#4514) add terminology (firefox-devtools#4512) * add terminology * Update terminology.md fix l10n label (firefox-devtools#4518) Fix parser returning failing to clone data (firefox-devtools#4520) debugging firefox add a use-case for feature flags Update local-development.md Unselects highlight on search window close Updates tests Fixing Shortcut Modal Dark Theme Legibility on Mac Move selected PrimaryTab local state to redux Fix typo another typo Cleanup Move selected PrimaryTab local state to redux π: Use onKeyDown in SearchBar to allow for simpler iteration of results (firefox-devtools#4533) In the QuickOpenModal we found that using onKeyDown meant a user could hold up/down to traverse their results more easily. In the searchbar holding enter does the same. Closes firefox-devtools#2527 removes declared hooks on componentWillUnmount (firefox-devtools#4426) * removes declared hooks on componentWillUnmount * changes listener binding from fat arrow to bind(this) Style debuggee domain (firefox-devtools#4536) π¨: Update our symbol parsing code to extract additional function types (firefox-devtools#4531) Remove query strings when displaying call stack frames (firefox-devtools#4535) [firefox-devtools#4545] Add tests for src/utils/assert.js (firefox-devtools#4546) Fix filename for assert.js tests Add tests for src/utils/log.js Displays result count only after initiating search (firefox-devtools#4525) Use new redux action in editor (firefox-devtools#4552) Refactor waitForPaused colon removed from subtitle CI fix show better error messages in jest (firefox-devtools#4558) Add timing data (firefox-devtools#4540) Refactor command action to use PROMISE (firefox-devtools#4554) * Refactor waitForPaused * Refactor command to be async Release 10/25 (firefox-devtools#4493) 10-31 (firefox-devtools#4543) updates readme 10/31 Update mochii to the latest version π (firefox-devtools#4562) Refactor map scopes to fetch scopes (firefox-devtools#4550) bump map-bindings (firefox-devtools#4566) togglePaneCollapse update (firefox-devtools#4508) Validate scripts (firefox-devtools#4565) do not expand all scope objects (firefox-devtools#4498) Update mochii to the latest version π (firefox-devtools#4576) Fix conditional breakpoints (firefox-devtools#4465) Update github-airtable-bridge to the latest version π (firefox-devtools#4578) Dont show Mochi output for passing tests (firefox-devtools#4580) Add airtable crm config (firefox-devtools#4582) Add Unit Tests for Editor (firefox-devtools#4522) Moves redux middleware to actions/utils (firefox-devtools#4567) * Moves redux middleware to actions/utils * Fixes import path in Jest * Changes directory from actions/utils to actions/utils/middleware * moves create-store from utils/middleware to utils Fix jest intermittent - quick open FIX - cmd+shift+b is no longer bound (firefox-devtools#4595) * cmd+shift+b is no longer bound - Fix * Fix2 - cmd+shift+b is no longer bound * action fix - cmd+shift+b is no longer bound Re-enable tests (firefox-devtools#4564) Improve JSX syntax highlighting (firefox-devtools#4539) Mochi intermittent script (firefox-devtools#4586) Disallow uncaught exceptions (firefox-devtools#4584) Optimistically clear pause state (firefox-devtools#4557) Competing Scripts - break webpack (firefox-devtools#4606) * Competing Scripts - break webpack * Update most-common-issues.md Fixes secondary pane css classes being localized (firefox-devtools#4611) Preview mochitest (firefox-devtools#4603) Panel fixes (firefox-devtools#4598) Add some additional helper methods Exclude flow types from identifier locations Add a license header (firefox-devtools#4601) Fix display of return value / thrown exception in scopes (firefox-devtools#4569) Adds mk_add_options AUTOCLOBBER=1 to .mozconfig (firefox-devtools#4622) Add launchpad screenshot (firefox-devtools#4623) bump bindings (firefox-devtools#4625) fix markdown lint (firefox-devtools#4626) Upgrade flow (firefox-devtools#4591) spell check docs (firefox-devtools#4627) Fix flow ignore (firefox-devtools#4628) flash function when it is copied - feature firefox-devtools#4022 (firefox-devtools#4634) added flash action Update mochii to the latest version π (firefox-devtools#4638) Issue ADD_SCOPES even for wasm files. (firefox-devtools#4637) Issue firefox-devtools#4639 - bump devtools-reps to 0.12.4 Issue firefox-devtools#4639 - update yarn.lock Replaces Object.assign with ... spread (firefox-devtools#4574) Re-enable wasm test (firefox-devtools#4644) Release the debugger (firefox-devtools#4633) * Bug 4420 fix * tweaks Add small lint fixes
bump mochii Update devtools package Preview: Show numbers inside a tooltip fix the failing pending breakpoints tests (firefox-devtools#4175) Switch Scopes form PropTypes to Flow Props (firefox-devtools#4180) No domain (firefox-devtools#4159) Adding "Add condition" to breakpoints context menu (firefox-devtools#4157) Don't show "No sources" hint if sources panel is hidden (firefox-devtools#4179) * Don't show "No sources" hint if sources panel is hidden * Don't hide PrimaryPane components via css * fix linting error * remove unused import Cleanup addbreakpoints (firefox-devtools#4184) Show mapped names in scopes bindings (firefox-devtools#3817) Flow types (firefox-devtools#4197) * Fix flow error Footer * Fix flow error Breakpint, Breakpoints Fix breakpoint jumping (firefox-devtools#4191) Validate expression syntax (firefox-devtools#4114) * validate expressions * add missing test * bump mochii Fix ESLint Dependencies from Fresh Install (firefox-devtools#4178) * Add dependencies for linting * Fix linting errors in master * Fix package.json lint errors Fix firefox-devtools#4043 - Change localization note and errorLoadingText (firefox-devtools#4058) Fix linting warnings (firefox-devtools#4204) Small style improvements on breakpoint and watch expression (firefox-devtools#4057) * PR#4057 - PART1: [breakpoint] small style improvements * PR#4057 - PART2: [watch expression] small style improvements 9-27 update (firefox-devtools#4193) Shortcuts style tweak (firefox-devtools#4202) Scroll bar is not ignored in vertical mode calculations (firefox-devtools#4127) Bump react to 15.6.2 (firefox-devtools#4160) Upgrade tree component (firefox-devtools#4215) Revert "Upgrade tree component (firefox-devtools#4215)" (firefox-devtools#4224) This reverts commit 179582c. Switch Popover PropTypes to flow props (firefox-devtools#4227) Fix source tabs not lining up with file tabs (firefox-devtools#4139) memoize loading (firefox-devtools#4216) Issue firefox-devtools#3966: Show small values inside tooltip (firefox-devtools#4218) add line about vulnerabilities (firefox-devtools#4231) Fix responsive issue on WelcomeBox (firefox-devtools#4119) remove paused class (firefox-devtools#4235) Fix webpack icon matching (firefox-devtools#4240) bump 9-29 (firefox-devtools#4214) * bump 9-29 * Revert "Upgrade tree component (firefox-devtools#4215)" This reverts commit 179582c. * assets Update devtools-source-map to the latest version π (firefox-devtools#4222) * fix(package): update devtools-source-map to version 0.14.2 * fix update script * bump yarn Fix some lingering POE + Exception bugs (firefox-devtools#4225) firefox doesn't like fit-content (firefox-devtools#4219) Disables updateScopeBindings for wasm source maps. (firefox-devtools#4245) React preview (firefox-devtools#4228) Moved workers to their own Worker directory. (firefox-devtools#4230) Show the full url of a file in the source tab tooltip (firefox-devtools#4203) (firefox-devtools#4226) Fixed Webpack Alignment (firefox-devtools#4250) AST Test (firefox-devtools#4249) remove unnecessary line Fix 4246 - Prevent validateDOMNesting warning (firefox-devtools#4247) remove mocha (firefox-devtools#4254) Claim an issue (firefox-devtools#4255) Fix some react test warnings (firefox-devtools#4248) Adds readme with debugger.html version information to mc. Fix prop-type warnings (firefox-devtools#4257) * Add separate prop-types dependency Using prop types from the React repo has been deprecated. * Alphabetize dependencies and remove duplicates Remove usage of create factory (firefox-devtools#4260) Lint equality (firefox-devtools#4278) * Updated text after equality linting * clean up Migrate ManagedTree proptypes to flow (firefox-devtools#4272) Add Command Slash Shortcut (firefox-devtools#4265) Closes firefox-devtools#4213 Stop breakpoint label click from toggling breakpoint (firefox-devtools#4269) Addresses firefox-devtools#4262 Provides the primary purpose of linking to the breakpoint's location in source. Extract temp variables for wrapped components in their tests (firefox-devtools#4279) [firefox-devtools#4270] Add tests for DevToolsUtils (firefox-devtools#4271) Optimize addToTree function. (firefox-devtools#4263) Fix one case of different lodash import format (firefox-devtools#4289) Make keyboard shortcuts button more specific and localized (firefox-devtools#4293) Fixing source-documents linting error (firefox-devtools#4290) Fix 4261 - Sort breakpoints by line number (firefox-devtools#4264) * Fix 4261 - Sort breakpoints by line number * Fix flow issues * Use lodash's sortBy for breakpoint sorting Remove object.assign from selectors.js close firefox-devtools#4267 (firefox-devtools#4268) Removes unneeded SVG DOM elements for source tree arrows. (firefox-devtools#4283) Added step over functionality for yield (firefox-devtools#4232) (firefox-devtools#4276) * Added step over functionality for yield (firefox-devtools#4232) * Consistent parser steps naming and generators fixture Proposal for closing firefox-devtools#3172 (firefox-devtools#4266) Updating docs (firefox-devtools#4298) Support framework frames for Preact (firefox-devtools#4296) Attempt to reduce intermittent failures for wasm-sourcemaps test. (firefox-devtools#4305) Fix Source Tree padding left (firefox-devtools#4303) * Fix Source Tree padding left * change to match the top ooutline spacing Change component function binding to class properties (firefox-devtools#4302) show mapped names in watch expressions (firefox-devtools#4206) - unifies right click "Copy source URI" for tree view & tab view (firefox-devtools#4325) bump lock file (firefox-devtools#4317) Release (10/6) (firefox-devtools#4322) Protect Worker and Browser Content Toolboxes (firefox-devtools#4331) Use Flow for Proptype checking in Source Tree Fix flow error (wip) Show class functions in the outline! (firefox-devtools#4286) WIP - Fix Secondary Panes Scroll Bar (firefox-devtools#4275) Simplify Editor LifeCycle (firefox-devtools#4301) Align empty message in Source Tab (firefox-devtools#4337) Remove last vestige of devtools.debugger.client-source-maps-enabled (firefox-devtools#4339) Fixed issue firefox-devtools#4291 (firefox-devtools#4340) Update travis MC commit (firefox-devtools#4335) Make alt click expand/collapse all the nodes cleanup ... Debugger Release (firefox-devtools#4341) Replace lodash find with native Array::find. Fixes firefox-devtools#4343. (firefox-devtools#4344) add a GotoLineModal (firefox-devtools#4323) This commit adds a gotoline modal/functionality triggered with `Cmd+:` (`CtrlOrCmd+Shift+;`) in the main debugger source window. A string that cannot be `parseInt()`'d is a noop. A number higher than the number of lines in the file will go to the end of the file. Upgrade Launchpad (firefox-devtools#4332) Improve maintainer experience (firefox-devtools#4352) Update sources arrow (firefox-devtools#4351) fix browser toolbox issues (firefox-devtools#4347) add getDomain tst (firefox-devtools#4356) Tidies up reducer comments (firefox-devtools#4354) modal height and position changed (firefox-devtools#4277) travis bump (firefox-devtools#4358) Improve triaging docs (firefox-devtools#4321) Attempt to address "Debugger.Frame is not live". [SourceTree] Set root directory (firefox-devtools#4363) * Preview: Show numbers inside a tooltip (firefox-devtools#4164) * initial commit * resolved conflicts in src/actions/ui.js and updated debugger.properties and SourcesTree.js based on flodolo and jasonLaster feedback * Update debugger.properties fix key remove svgs Update Module Manifest Update Module Manifest Update Module Manifest Update Module Manifest Update Module Manifest Update Module Manifest Update Release (3) Update Release (3) Removed tabs + button (firefox-devtools#4367) * Removed tabs + button Issue firefox-devtools#4312 Removed: - import of formatKeyShortcut - onclick - render newButton method Kept: SVG plus icon L10N "sourceTabs.newTabButtonTooltip" key value pair * Removed tabs + button Issue firefox-devtools#4312 Removed: - import of formatKeyShortcut - onclick - render newButton method - debugger.properties sourceTabs.newTabButtonTooltip Kept: SVG plus icon add docs on merge conflicts (firefox-devtools#4365) File search reducer (firefox-devtools#4368) Fixes mis-aligned tooltip (firefox-devtools#4370) * Fixes mis-aligned tooltip * tweaks Fix Empty Lines off by one issue (firefox-devtools#4361) get display name and pass it to Popup.js (firefox-devtools#4357) small prettier changes (firefox-devtools#4364) Adds L10N for previously hardcoded keybindings (firefox-devtools#4378) * Adds L10N for previously hardcoded keybindings * Updates keybindings as requested by owner Update Release (10-13) (firefox-devtools#4380) add shortcuts modal in vertical mode (firefox-devtools#4288) (firefox-devtools#4375) Update Shortcuts button (firefox-devtools#4382) docs most-common-issues (firefox-devtools#4295) Use a monospace font for editor line numbers (firefox-devtools#4391) Set layout change Cleanup babel (firefox-devtools#4404) Adds flow types to the Scope declaration. (firefox-devtools#4405) Synchronize smoke test for browser content toolbox from m-c (firefox-devtools#4408) Update mochii to the latest version π (firefox-devtools#4414) Converted blackBox/prettyPrint SVG's to CSS (firefox-devtools#4386) Revert "Use a monospace font for editor line numbers" (firefox-devtools#4416) This reverts commit 2544fc1. Fix "3" expressions Fix firefox-devtools#4397 - Don't allow context menu when a line is empty π¨: Rework `SourceSearch` into `SourcesModal` (firefox-devtools#4398) Keeps focus on input field (firefox-devtools#4423) add layout test (firefox-devtools#4415) Change port 9000 default to 8116 default (firefox-devtools#4434) Scroll to column (firefox-devtools#4143) * fix issue with the line not highlighting in the editor * undo some changes to test * fix * switch to watForLoaded * flash line all ways * fix the conditional breakpoint panel mochitest * if there is no selected location bail early, fix a mochitest * fix mochitests, cleanup index * fix the dbg-tabs mochitest * fix the breakpoint visible mochitest issue * fix the failing unit tests * stop nesting the location info * more cleanups Upgrade flow (firefox-devtools#4433) * Upgrade Flow * Use `static` properties for `defaultProps` Flow uses the defaultProps static property to type the default props. * Convert a set of components over to the new Flow syntax * Remove a usage of 'createFactory' * Convert another batch of components over to the new Flow syntax * Convert yet another batch of components over to the new Flow syntax * Remove unused file This file was originally removed in 6ba9b0b. However, while merging in master in e60cedd, I accidentally added the file back. * Don't type check devtools-reps * Update ref for the ConditionalPanel Per the Flow docs (https://flow.org/en/docs/react/refs/), we need to explicitly set the type of the ref and ensure that it is nullable. * Convert more files to the new Flow syntax * Update the last items for the new Flow syntax * Only ignore the object-inspector So that we can still import its types. * Change flow types to use primitive values Support framework frames for Marko (firefox-devtools#4430) * added marko to library frames * code simplified * refactoring library map * moving great before react fix bug where the line being 0 returns a falsy (firefox-devtools#4445) * fix bug where the line being 0 returns a falsy and does not cause the line to flash * use isLoaded util update 10-17-2017 (firefox-devtools#4400) * update 10-17-2017 * update according to jlast's comments * fix lint bump yarn (firefox-devtools#4442) Undo string change to editor.addConditionalBreakpoint (firefox-devtools#4448) Working class and imports finder (firefox-devtools#4329) 10/13 2nd release (firefox-devtools#4447) support framework frames for aframe (firefox-devtools#4458) Fix warnings for var usage (firefox-devtools#4456) bump launchpad (firefox-devtools#4452) add support framework frames for Nuxt.js (firefox-devtools#2980) (firefox-devtools#4460) Add Jest Cases Fix links in debugging-the-debugger page Fix links in getting-setup page Fix links in getting-setup page 1 Blackboxed sources distinguished by icon in source tree (firefox-devtools#4441) Fixes 3846 Source Tabs and Gutter Column Don't Line Up (firefox-devtools#4427) * Update PaneToggle.css * Update Tabs.css * fix for dynamic width * error check for no element * moving ui related utilities to utils/ui file * adding export to each function Update README.md fix firefox-devtools#4471 - expand the right sidebar on pausing at breakpoint event stopped for context menu for non firefox browsers event prevent default moved Add next.js to framework frames (firefox-devtools#4476) Converted Source Tree SVG's (including Blackbox) to images using CSS styles (firefox-devtools#4350) (firefox-devtools#4477) add the computed property to allow differentiating between computed and uncomputed memberexpressions fix flow move the func to a utility file added tests fix tests Fix footer background length in dark theme Highlight errors in editor fix css linting errors cleanup Make error background color lighter refactoring fix getting the lineNo from CoideMirror (firefox-devtools#4466) Move workflow to pr docs (wip) Refactor pause actions (firefox-devtools#4439) * Update Pause Semantics [Issue-4486]-Changing the overflow rule of secondaryPanel to prβ¦ (firefox-devtools#4487) QuickOpenModal (firefox-devtools#4464) Fix cross-configuration problems (firefox-devtools#4475) * Add gitattributes * fix: Multi-platform and configuration issues This configures all systems to checkout and use LF line endings. The jest test system also runs without colors by default now. This allows the tests to pass in any environment regardless of color scheme. * tweaks bump mochi Close ConditionalPanel on blur [Preview] Some lines are incorrectly marked as out of scope Add travis notifications π: Fix the quick-open mochitest There were some race issues with the quick open mochitest assertions that this cleared up. π: Add some mochitest debugging tips. Added some tips to the mochitest debugging docs based on experience debugging race issue. Also Prettier fixed some things. tweaks Weekly Post - 10-24 (firefox-devtools#4494) Remove createClass and Proptypes warning (firefox-devtools#4510) (firefox-devtools#4350) Converted Step Button SVG's to images using CSS Styles (firefox-devtools#4502) notify on failure (firefox-devtools#4511) Fixes firefox-devtools#4505 - Convert file SVG to image (firefox-devtools#4514) add terminology (firefox-devtools#4512) * add terminology * Update terminology.md fix l10n label (firefox-devtools#4518) Fix parser returning failing to clone data (firefox-devtools#4520) debugging firefox add a use-case for feature flags Update local-development.md Unselects highlight on search window close Updates tests Fixing Shortcut Modal Dark Theme Legibility on Mac Move selected PrimaryTab local state to redux Fix typo another typo Cleanup Move selected PrimaryTab local state to redux π: Use onKeyDown in SearchBar to allow for simpler iteration of results (firefox-devtools#4533) In the QuickOpenModal we found that using onKeyDown meant a user could hold up/down to traverse their results more easily. In the searchbar holding enter does the same. Closes firefox-devtools#2527 removes declared hooks on componentWillUnmount (firefox-devtools#4426) * removes declared hooks on componentWillUnmount * changes listener binding from fat arrow to bind(this) Style debuggee domain (firefox-devtools#4536) π¨: Update our symbol parsing code to extract additional function types (firefox-devtools#4531) Remove query strings when displaying call stack frames (firefox-devtools#4535) [firefox-devtools#4545] Add tests for src/utils/assert.js (firefox-devtools#4546) Fix filename for assert.js tests Add tests for src/utils/log.js Displays result count only after initiating search (firefox-devtools#4525) Use new redux action in editor (firefox-devtools#4552) Refactor waitForPaused colon removed from subtitle CI fix show better error messages in jest (firefox-devtools#4558) Add timing data (firefox-devtools#4540) Refactor command action to use PROMISE (firefox-devtools#4554) * Refactor waitForPaused * Refactor command to be async Release 10/25 (firefox-devtools#4493) 10-31 (firefox-devtools#4543) updates readme 10/31 Update mochii to the latest version π (firefox-devtools#4562) Refactor map scopes to fetch scopes (firefox-devtools#4550) bump map-bindings (firefox-devtools#4566) togglePaneCollapse update (firefox-devtools#4508) Validate scripts (firefox-devtools#4565) do not expand all scope objects (firefox-devtools#4498) Update mochii to the latest version π (firefox-devtools#4576) Fix conditional breakpoints (firefox-devtools#4465) Update github-airtable-bridge to the latest version π (firefox-devtools#4578) Dont show Mochi output for passing tests (firefox-devtools#4580) Add airtable crm config (firefox-devtools#4582) Add Unit Tests for Editor (firefox-devtools#4522) Moves redux middleware to actions/utils (firefox-devtools#4567) * Moves redux middleware to actions/utils * Fixes import path in Jest * Changes directory from actions/utils to actions/utils/middleware * moves create-store from utils/middleware to utils Fix jest intermittent - quick open FIX - cmd+shift+b is no longer bound (firefox-devtools#4595) * cmd+shift+b is no longer bound - Fix * Fix2 - cmd+shift+b is no longer bound * action fix - cmd+shift+b is no longer bound Re-enable tests (firefox-devtools#4564) Improve JSX syntax highlighting (firefox-devtools#4539) Mochi intermittent script (firefox-devtools#4586) Disallow uncaught exceptions (firefox-devtools#4584) Optimistically clear pause state (firefox-devtools#4557) Competing Scripts - break webpack (firefox-devtools#4606) * Competing Scripts - break webpack * Update most-common-issues.md Fixes secondary pane css classes being localized (firefox-devtools#4611) Preview mochitest (firefox-devtools#4603) Panel fixes (firefox-devtools#4598) Add some additional helper methods Exclude flow types from identifier locations Add a license header (firefox-devtools#4601) Fix display of return value / thrown exception in scopes (firefox-devtools#4569) Adds mk_add_options AUTOCLOBBER=1 to .mozconfig (firefox-devtools#4622) Add launchpad screenshot (firefox-devtools#4623) bump bindings (firefox-devtools#4625) fix markdown lint (firefox-devtools#4626) Upgrade flow (firefox-devtools#4591) spell check docs (firefox-devtools#4627) Fix flow ignore (firefox-devtools#4628) flash function when it is copied - feature firefox-devtools#4022 (firefox-devtools#4634) added flash action Update mochii to the latest version π (firefox-devtools#4638) Issue ADD_SCOPES even for wasm files. (firefox-devtools#4637) Issue firefox-devtools#4639 - bump devtools-reps to 0.12.4 Issue firefox-devtools#4639 - update yarn.lock Replaces Object.assign with ... spread (firefox-devtools#4574) Re-enable wasm test (firefox-devtools#4644) Release the debugger (firefox-devtools#4633) * Bug 4420 fix * tweaks Add small lint fixes Display more wast text lines (firefox-devtools#4648) Relax findSource Update mochitests.md Breakpoint setting unit tests (firefox-devtools#4655) * Breakpoint stepping unit tests * Working Tests Release (11-7) 2nd try (firefox-devtools#4670) * skip quick open on windows Drop react-immutable-proptypes (firefox-devtools#4667) Fix Console Hang Specify the ids of the jump and the add-watch-expression menuitems initial commit initial commit
Associated Issue: #3427
Summary of Changes
generatedLocationto a frameTest Plan
Tell us a little a bit about how you tested your patch.
Example test plan:
buffer.push(current)) set breakpointThe top scope needs to have
current,buffervariables shown.P.S. needs some modification to the devtools-source-map