Closed Bug 1534786 Opened 2 years ago Closed 2 years ago

Pauses at missing breakpoints

Categories

(DevTools :: Debugger, enhancement, P1)

enhancement

Tracking

(firefox67 fixed)

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: jlast, Assigned: bhackett1024)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

It's possible to pause at a breakpoint today and not see the breakpoint in the UI.

I think it happens because

  1. on debugger open we set all of the pending breakpoint generated locations
  2. later when we check pending breakpoints in newSource, we only handle it if there is a matching source. this is a problem in source maps where there IS a pending breakpoint with a valid generated locaton, but invalid original location
    here is a good case study:
    "options": {
      "condition": null,
      "logValue": null,
      "hidden": false
    },
    "disabled": false,
    "location": {
      "sourceUrl": "webpack:////Users/jlaster/src/moz/debugger.html/src/actions/pause/paused.js",
      "line": 45,
      "column": 29
    },
    "astLocation": {
      "name": "paused",
      "offset": {
        "line": 14
      },
      "index": 0
    },
    "generatedLocation": {
      "sourceUrl": "http://localhost:8000/assets/build/debugger.js",
      "line": 100900,
      "column": 30
    }
  },

I added this breakpoint WHEN debugging in github
now this bp gets set when i'm debugging in gecko-dev
but, the original file has a different path
"webpack:////Users/jlaster/src/moz/gecko-dev/devtools/client/debugger/new/src/actions/pause/paused.js"
as a result, we SET this breakpoint in the server and pause, but we don't

a) show the beakpoint anywhere
b) clear the breakpoint

Priority: -- → P1
Attached patch WIP + testSplinter Review

This patch is mostly done. Instead of waiting to see a matching original source before showing a breakpoint in the UI, we can also show the breakpoint when a source with the same generated URL appears. This breakpoint is removed if the original source later appears, during syncing.

Assignee: nobody → bhackett1024
Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/92d7192b7d69
Show pending breakpoints as soon as their generated source appears, r=jlast.

Backed out changeset 92d7192b7d69 (Bug 1534786) for Linux debugger failures

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=92d7192b7d69054565010b2ba41dc667d01fc4cb&selectedJob=233802852

Backout link: https://hg.mozilla.org/integration/mozilla-inbound/rev/b3ac7a20c462f5bf671f9579db6a124131a871ff

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=233802852&repo=mozilla-inbound&lineNumber=347

[task 2019-03-14T04:12:26.825Z] $ jest
[task 2019-03-14T04:12:35.219Z] PASS devtools-reps test packages/devtools-reps/src/reps/tests/grip-array.js
[task 2019-03-14T04:12:35.309Z] PASS devtools-reps test packages/devtools-reps/src/reps/tests/grip.js
[task 2019-03-14T04:12:35.690Z] PASS devtools-components test packages/devtools-components/src/tests/tree.js
[task 2019-03-14T04:12:37.352Z] PASS devtools-reps test packages/devtools-reps/src/reps/tests/string-with-url.js
[task 2019-03-14T04:12:37.359Z] ● Console
[task 2019-03-14T04:12:37.361Z]
[task 2019-03-14T04:12:37.363Z] console.error node_modules/fbjs/lib/warning.js:33
[task 2019-03-14T04:12:37.364Z] Warning: Each child in an array or iterator should have a unique "key" prop.
[task 2019-03-14T04:12:37.366Z]
[task 2019-03-14T04:12:37.368Z] Check the top-level render call using <span>. See https://fb.me/react-warning-keys for more information.
[task 2019-03-14T04:12:37.370Z] in span
[task 2019-03-14T04:12:37.371Z]
[task 2019-03-14T04:12:40.781Z] PASS devtools-reps test packages/devtools-reps/src/reps/tests/element-node.js
[task 2019-03-14T04:12:41.624Z] PASS devtools-reps test packages/devtools-reps/src/reps/tests/function.js
[task 2019-03-14T04:12:42.513Z] PASS devtools-reps test packages/devtools-reps/src/reps/tests/error.js
[task 2019-03-14T04:12:48.957Z] PASS test src/workers/parser/tests/mapExpression.spec.js (13.604s)
[task 2019-03-14T04:12:51.820Z] PASS test src/utils/tests/source.spec.js
[task 2019-03-14T04:12:55.607Z] FAIL test src/actions/tests/pending-breakpoints.spec.js (13.046s)
[task 2019-03-14T04:12:55.609Z] ● adding sources › corresponding breakpoints are added for a single source
[task 2019-03-14T04:12:55.609Z]
[task 2019-03-14T04:12:55.609Z] expect(received).toEqual(expected)
[task 2019-03-14T04:12:55.609Z]
[task 2019-03-14T04:12:55.610Z] Expected value to equal:
[task 2019-03-14T04:12:55.610Z] 1
[task 2019-03-14T04:12:55.610Z] Received:
[task 2019-03-14T04:12:55.611Z] 2
[task 2019-03-14T04:12:55.611Z]
[task 2019-03-14T04:12:55.611Z] 365 | await waitForState(store, state => selectors.getBreakpointCount(state) > 0);
[task 2019-03-14T04:12:55.612Z] 366 |
[task 2019-03-14T04:12:55.612Z] > 367 | expect(selectors.getBreakpointCount(getState())).toEqual(1);
[task 2019-03-14T04:12:55.612Z] | ^
[task 2019-03-14T04:12:55.612Z] 368 | });
[task 2019-03-14T04:12:55.613Z] 369 |
[task 2019-03-14T04:12:55.613Z] 370 | it("corresponding breakpoints are added to the original source", async () => {
[task 2019-03-14T04:12:55.613Z]
[task 2019-03-14T04:12:55.614Z] at Object.<anonymous> (src/actions/tests/pending-breakpoints.spec.js:367:54)
[task 2019-03-14T04:12:55.614Z] at step (src/actions/tests/pending-breakpoints.spec.js:35:191)
[task 2019-03-14T04:12:55.614Z] at src/actions/tests/pending-breakpoints.spec.js:35:361
[task 2019-03-14T04:12:55.615Z]
[task 2019-03-14T04:12:55.615Z] ● adding sources › add corresponding breakpoints for multiple sources
[task 2019-03-14T04:12:55.615Z]
[task 2019-03-14T04:12:55.615Z] expect(received).toEqual(expected)
[task 2019-03-14T04:12:55.615Z]
[task 2019-03-14T04:12:55.616Z] Expected value to equal:
[task 2019-03-14T04:12:55.616Z] 1
[task 2019-03-14T04:12:55.616Z] Received:
[task 2019-03-14T04:12:55.616Z] 2
[task 2019-03-14T04:12:55.616Z]
[task 2019-03-14T04:12:55.617Z] 416 |
[task 2019-03-14T04:12:55.617Z] 417 | await waitForState(store, state => selectors.getBreakpointCount(state) > 0);
[task 2019-03-14T04:12:55.617Z] > 418 | expect(selectors.getBreakpointCount(getState())).toEqual(1);
[task 2019-03-14T04:12:55.618Z] | ^
[task 2019-03-14T04:12:55.618Z] 419 | });
[task 2019-03-14T04:12:55.618Z] 420 | });
[task 2019-03-14T04:12:55.618Z] 421 |
[task 2019-03-14T04:12:55.618Z]
[task 2019-03-14T04:12:55.619Z] at Object.<anonymous> (src/actions/tests/pending-breakpoints.spec.js:418:54)
[task 2019-03-14T04:12:55.619Z] at step (src/actions/tests/pending-breakpoints.spec.js:35:191)
[task 2019-03-14T04:12:55.619Z] at src/actions/tests/pending-breakpoints.spec.js:35:361
[task 2019-03-14T04:12:55.619Z]
[task 2019-03-14T04:12:56.928Z] PASS test src/components/test/QuickOpenModal.spec.js (21.671s)

Flags: needinfo?(bhackett1024)
Status: NEW → ASSIGNED
Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/25f9343a6480
Show pending breakpoints as soon as their generated source appears, r=jlast.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Pushed by jlaster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/16f9f23229b2
Ensure that breakpoints are visible when you reload formatted files. r=bhackett
Flags: needinfo?(bhackett1024)
Depends on: 1542620
Flags: needinfo?(bhackett1024)
Depends on: 1544623
You need to log in before you can comment on or make changes to this bug.