Open Bug 1602488 Opened 5 years ago Updated 2 years ago

The OBT debugger should now pause on content XHR too, it does not

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Fission Milestone:Future)

Fission Milestone Future

People

(Reporter: pbro, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: dt-fission-future)

With the work done on the OBT to see content processes and frames, the debugger should know how to pause on XHR in content too.
This does not work though.

  • In a tab, load google.com
  • Open the OBT, select the Debugger panel, check “Pause on any URL”
  • Type into the google search input to generate XHR

==> The XHR breakpoint doesn’t hit

I tracked it down to this code:
https://searchfox.org/mozilla-central/source/devtools/server/actors/thread.js#651

      const frame = this.dbg.getNewestFrame();

For some reason, getNewestFrame returns null.
I think we hit this code from the parent process thread actor, running in the parent process.
So, I imagine the issue rather comes from this frontend code:
https://searchfox.org/mozilla-central/rev/23d4bffcad365e68d2d45776017056b76ca9a968/devtools/client/debugger/src/client/firefox/commands.js#186-192

function setXHRBreakpoint(path: string, method: string) {
  return currentThreadFront.setXHRBreakpoint(path, method);
}

function removeXHRBreakpoint(path: string, method: string) {
  return currentThreadFront.removeXHRBreakpoint(path, method);
}

which only registers these type of breakpoints on the top level target. In the case of the OBT, the parent process target only.

It would work if we ensure calling setXHRBreakpoint on all targets, but we should also be careful as _onOpeningRequest will be called in the parent process for all requests. We do not break in the parent process because getNewestFrame returns null, but this may be brittle.

The priority flag is not set for this bug.
:jlast, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jlaster)
Flags: needinfo?(jlaster)
Priority: -- → P3
Whiteboard: dt-fission-m2-reserve

Tracking for Fission Nightly (M6)

Fission Milestone: --- → M6

dt-fission-m2-reserve bugs do not need to block Fission Nightly (M6). For now, let's track them for Fission riding the trains to Beta (M7) so we revisit these bugs before we ship Fission.

Fission Milestone: M6 → M7

Bulk move of all dt-fission-m2-reserve bugs to Fission MVP milestone.

Fission Milestone: M7 → MVP
Whiteboard: dt-fission-m2-reserve → dt-fission-m3-mvp
Whiteboard: dt-fission-m3-mvp → dt-fission-m3-reserve

Moving "dt-fission-m3-reserve" bugs to "dt-fission-future" because they don't block Fission MVP.

Fission Milestone: MVP → Future
Whiteboard: dt-fission-m3-reserve → dt-fission-future
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.