-
Notifications
You must be signed in to change notification settings - Fork 751
breakpoints disappear on sourcemapped sources #3440
breakpoints disappear on sourcemapped sources #3440
Conversation
|
|
||
| it("should render breakpoints with columns", async () => { | ||
| const sourceId = "server1.conn1.child1/source1"; | ||
| const breakpoints = I.Map({ id1: { location: { column: 2, sourceId } } }); |
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 was failing
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
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.
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); |
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.
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() |
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.
nice
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.
👍
* sourcemaps breakpoints disappear on sourcemapped sources * add snapshot
* sourcemaps breakpoints disappear on sourcemapped sources * add snapshot
* sourcemaps breakpoints disappear on sourcemapped sources * add snapshot
* sourcemaps breakpoints disappear on sourcemapped sources * add snapshot
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
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