[prettyPrint] prettifing should remember the user intent to jump to a specific line
Affordability issue I noticed in https://github.com/devtools-html/debugger.html/issues/3777
STR
- Open
https://www.facebook.com/?pagelet_ts=1(logged out) - Click one of the first logs in the Console (
BigPipe/init …) to jump to the file - Prettify the file
- ~Old steps~
- ~Open console on bbc.com/news~
- ~Click source for formatted log (was init.js:1:11836 for me)~
- ~Prettify
init.jsin Debugger~
Actual
Source is prettified but debugger forgot that the user wanted to navigate to specific position in the file,
Expected
After prettify is done the file should jump to the console.log position that the user wanted to go to.
/claim
Thanks for claiming the issue! :wave:
Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.
:fox_face: Debugger team!
/unclaim
Done :+1:
~This seems to work for me every other time. I saw it working when testing 1hr ago; testing it again now did not break me to the right line.~
Doesn't work for me. I tested first on google.com, clicking one of the first logs in console. In the minified file that opens, prettify does highlight a line but it is not actually the one that logs the messages (but possibly just the line number that was highlighted before). Testing on BBC does not move to a new line at all.
I looked into this, I won't have a chance to finish it but figured I should post my learning here.
devtools/client/debugger/new/src/actions/sources/prettyPrint.jsline 113, when defining selectedLocation, there is no column information, only line (which for the BBC example is line = 1, therefore it remains on line 1 when prettified).
- the line information is lost on
devtools/client/webconsole/new-console-output-wrapper.jswhen callingviewSourceInDebuggerit does not give the column information, and so does not seem to store it. - I tried manually setting the options.location.column = 3487 (as in BBC example) in this place and it did not change the result.
devtools/server/actors/utils/TabSources.jsaround line 691,getGeneratedLocation, seems to return the same location as the paramoriginalLocation, I have yet to see this change. I believe this is close to the root of the problem.
Thank you for the research @ericawright !
@digitarald: are the STR from comment #0 still valid? I don't see init.js when loading bbc.com/news
Honza
@janodvarko updated the example with FB
@digitarald can you still reproduce this? If you have valid STRs I am happy to clone this into Bugzilla.
Honza
This was fixed as part of m1