Closed Bug 1531767 Opened 7 months ago Closed 6 months ago

[remote-dbg-next] Cannot inspect worker on remote runtime twice

Categories

(DevTools :: about:debugging, enhancement)

enhancement
Not set

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1534201

People

(Reporter: jdescottes, Unassigned)

Details

STRs:

  • open aboutdebugging
  • connect to Fx for android runtime via USB
  • select the runtime
  • find a shared worker (there should be one or two)
  • click inspect
  • close the toolbox window
  • click inspect again
    ER: Should reopen the window
    AR: Nothing happens

Found the issue while working on the Processes category, which shares a similar issue. When the toolbox is closed, the target front is destroyed and we need a new front. However unless something triggers a requestWorkers action, the workers will not be updated.

An option to fix this is to request the list of workers again when closing the toolbox. See similar snippet from my WIP patch on processes:

case DEBUG_TARGETS.PROCESS: {
    const devtoolsClient = runtimeDetails.clientWrapper.client;
    const processTargetFront = devtoolsClient.getActor(id);
    const toolbox = await gDevTools.showToolbox(processTargetFront, null,
      Toolbox.HostType.WINDOW);

    // Once the target is destroyed after closing the toolbox, the front is gone and
    // can no longer be used. Extensions don't have the issue because we don't list
    // the target fronts directly, but proxies on which we call connect to create a
    // target front when we want to inspect them. Local workers don't have this issue
    // because closing the toolbox stops several workers which will indirectly trigger
    // a requestWorkers action. However workers on a remote runtime have the exact
    // same issue.
    // To workaround the issue we request processes after the toolbox is closed.
    toolbox.once("destroy", () => dispatch(Actions.requestProcesses()));
    break;
}

Using about:devtools-toolbox tabs to debug those targets would also fix the issue.

Priority: -- → P3
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1534201
No longer blocks: remote-debugging-ng-m2
Priority: P3 → --
You need to log in before you can comment on or make changes to this bug.