Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Conversation

@codehag
Copy link
Contributor

@codehag codehag commented Jul 25, 2017

Associated Issue: #3439

When I started working on this issue, I wasn't sure what was wrong and it looked quite concerning, so i went ahead and started on it.

It looks like the error was coming from column breakpoints being ignored when column bps are enabled, and since all breakpoints which come from original sources have columns, these were being ignored. I removed the filter, as the breakpoints render correctly without it.

Caveat: Not sure if this is how it should work, or if column breakpoints are enabled by default.

I tested in a couple of spots:

TODO mvc: https://devtools-html.github.io/debugger-examples/examples/todomvc/
Sourcemapped files: http://wbamberg.github.io/example-websites/source-mapping/index.html
messy sourcemapped files: https://devtools-html.github.io/debugger-examples/examples/sequence-print/sequence_print.html

These three were also tested in the panel

I added a test to illustrate the case.

Summary of Changes

  • remove filtering of column bps from Breakpoints Component

Test Plan

Add tests for both column and non column breakpoints. These were the bulk of the work, and are probably useful even if the fix isn't


it("should render breakpoints with columns", async () => {
const sourceId = "server1.conn1.child1/source1";
const breakpoints = I.Map({ id1: { location: { column: 2, sourceId } } });
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was failing

@codecov
Copy link

codecov bot commented Jul 25, 2017

Codecov Report

Merging #3440 into next will increase coverage by 0.12%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##            next    #3440      +/-   ##
=========================================
+ Coverage   49.8%   49.92%   +0.12%     
=========================================
  Files        109      109              
  Lines       4516     4515       -1     
  Branches     930      929       -1     
=========================================
+ Hits        2249     2254       +5     
+ Misses      2267     2261       -6
Impacted Files Coverage Δ
src/components/Editor/Breakpoints.js 50% <100%> (+36.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a271d41...034a0b6. Read the comment docs.

Copy link
Contributor

@jasonLaster jasonLaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I love the tests

const breakpoints = I.Map({ id1: { location: { column: 2, sourceId } } });

const { component, props } = render({ breakpoints });
expect(component.find("Breakpoint").length).toBe(props.breakpoints.size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets also have a snapshot here so we can get some regression testing on the children

selectedSource: { sourceId, get: () => false },
editor: {
codeMirror: {
setGutterMarker: jest.fn()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Copy link
Contributor

@jasonLaster jasonLaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jasonLaster jasonLaster merged commit abcf2a6 into firefox-devtools:next Jul 25, 2017
jasonLaster pushed a commit to jasonLaster/debugger.html that referenced this pull request Jul 26, 2017
* sourcemaps breakpoints disappear on sourcemapped sources

* add snapshot
codehag added a commit to wldcordeiro/debugger.html that referenced this pull request Jul 26, 2017
* sourcemaps breakpoints disappear on sourcemapped sources

* add snapshot
jasonLaster pushed a commit to jasonLaster/debugger.html that referenced this pull request Jul 27, 2017
* sourcemaps breakpoints disappear on sourcemapped sources

* add snapshot
jbhoosreddy pushed a commit to jbhoosreddy/debugger.html that referenced this pull request Aug 20, 2017
* sourcemaps breakpoints disappear on sourcemapped sources

* add snapshot
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants