Closed Bug 1486483 Opened 6 years ago Closed 5 years ago

Debugger misses sources on first open

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1503422

People

(Reporter: yulia, Unassigned)

References

(Blocks 1 open bug)

Details

STR:
Run debugger-talos test project -> https://github.com/codehag/debugger-talos-example
In a new browser, where devtools has not yet been opened, navigate to localhost:3000
Open the debugger

Expected:
- three folders should be present in the tree:
	debugger-sourcemap/ 
	js/  
	static/

Actual Result:
- Only two folders are present
 	debugger-sourcemap/
	Static/

If you reload the page with the debugger already open, you will see the correct files.

This was found while resolving the talos test to test the lazy source loading work, since we are not loading the JS directory on first load, this might explain why we didn’t see any improvements on first open, and only on reload. Once this is fixed, we will need to update the talos test. The line that should be replaced in the test is this one: `await waitForSource(dbg, expected.sourceURL);` on line 228 in debugger-helper.js. it should be replaced with `await waitForSources(dbg, expected.sources);` which will wait for the full count, rather than just App.js
Arai, is this something you're able to reproduce?
Flags: needinfo?(arai.unmht)
(In reply to Yulia Startsev [:yulia] from comment #0)
> STR:
> Run debugger-talos test project ->
> https://github.com/codehag/debugger-talos-example

how to run?
Flags: needinfo?(ystartsev)
The instructions for running are the same as the create react app: https://github.com/facebook/create-react-app

To quick start:
```
$ yarn
$ yarn start 
```

the full list of commands is in the package.json file. let me know if that works for you!
Flags: needinfo?(ystartsev)
also you can use npm

```
npm install
npm run start
```
thanks :)
yes, I can reproduce
Flags: needinfo?(arai.unmht)
Priority: -- → P1
I think this is related to the GC.  I'm not able to reproduce this just by loading the page and then opening the debugger, but if I load the page, go to about:memory and click 'Minimize memory usage' (which triggers several GCs/CCs) and *then* open the debugger, the js/ subfolder is missing.  If all the sources in this folder have been collected, the server won't be able to find them and they will not be displayed in the frontend.
> Minimize memory usage

that's a nice trick
Depends on: dbg-sources
No longer depends on: dbg-sources

@Jim: Should this be marked as dup of 1503422? Or what's different in this case?

Honza

Flags: needinfo?(jimb)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Flags: needinfo?(jimb)
You need to log in before you can comment on or make changes to this bug.