Open Bug 1694405 Opened 3 years ago Updated 3 years ago

Debugger shows no sources when inspecting remote websites.

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: emilio, Unassigned)

References

(Blocks 1 open bug)

Details

What were you doing?

  1. Attach devtools to Fenix Nightly via about:debugging.
  2. Try to use the JS debugger.

What happened?

Breakpoints work, but the debugger doesn't show anything ("This page has no sources")

What should have happened?

I can see the sources so I can debug :)

Hi Emilio, I'll try to repro, meanwhile can you share the exact build number for both Fenix and your desktop Firefox?

Flags: needinfo?(emilio)

I can connect from latest nightly Desktop to latest nightly Fenix and I see sources.

However if I close the about:devtools-toolbox tab and re-open it, then I won't get sources.
I will guess that we are not re-emitting the resources in this scenario?

One workaround which brings back sources for me is to disconnect from the Device, reconnect (not physically, just using the about:debugging feature) and inspect the tab again.

But breakpoints don't work for me at all. Emilio, are you using debugger; statements or actual breakpoints set in the devtools UI? Curious why it would work for you but not for me.

I confirm this is not a mobile-only issue and can be easily reproduced with remote debugging of FF desktop.

STRs to connect the two Desktop FF:

  • start a Firefox instance as debugger server (--start-debugger-server, make sure to use a separate profile which has devtools.debugger.remote-enabled & devtools.chrome.enabled set to true)
  • start another Firefox instance to use about:debugging (with another profile)
  • go to about:debugging, add localhost:6000 as a Network Location
  • connect to the remote FF

STRs for the bug (once you are connected)

  • open a tab you want to debug (so with some sources preferably) on the debugger server FF
  • potentially refresh about debugging if you don't see the tab dynamically appear in the list
  • click on Inspect for this tab
  • in the about:devtools-toolbox tab which just opened, check the Debugger tab and check you can see sources
  • close about:devtools-toolbox
  • click on inspect again

ER: Should see sources
AR: No sources found

Note that when remote debugging, we cache the client used to connect to the remote FF. So when you close the about:devtools-toolbox, we do less cleanup than when closing a regular toolbox. My guess is that some actors are not properly cleaned up (watcher actor?) and when we connect a second time we don't get the existing sources.

It was latest nightly as of yesterday (of both Fenix and Firefox). Glad you could repro :)

Flags: needinfo?(emilio)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)

It was latest nightly as of yesterday (of both Fenix and Firefox). Glad you could repro :)

Emilio, Julian's STRs are including closing/opening the toolbox. Is that something you also did? Or was the Debugger broken for you even without reopening the Toolbox?

Honza

Flags: needinfo?(emilio)

It sounds plausible I did that yeah, I had been inspecting that page for a bit. Not 100% sure, but I couldn't repro today without reopening the toolbox so let's assume I did that yesterday too.

Flags: needinfo?(emilio)
Blocks: dbg-sources
Severity: -- → S3
Has STR: --- → yes
Priority: -- → P3
See Also: → 1697184
You need to log in before you can comment on or make changes to this bug.