Cannot set breakpoints after using "pretty print source" on new Function() sources
Categories
(DevTools :: Debugger, defect, P3)
Tracking
(Not tracked)
People
(Reporter: random_n0body, Unassigned)
References
(Blocks 3 open bugs)
Details
Attachments
(1 file)
(deleted),
video/mp4
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:85.0) Gecko/20100101 Firefox/85.0
Steps to reproduce:
Opening a separate bug for this as instructed by :bomsy
- Go to https://www.paulbrunngard.com/se/skovards-produkter/impregneringsspray-och-refresh/footwear-repel
- Open devtools (f12)
- select the source starting with static-scripts-deploy.s3
- select the javascript file called "depict-aj.js"
- click the "pretty print source" button
- put a breakpoint on line 23 / the line containing "new Function"
- reload the page
- when the debugger pauses, step through the code until you are in the code that was executed inside of
new Function('code')()
, it will be called "SOURCE" - step through it a little bit to convince yourself that debugging it does actually work
- hit the pretty print button (this time on the source called "source123" or similar)
- attempt to set a breakpoint on any line
Actual results:
It is not possible to set a breakpoint on the pretty printed new Function source.
If it is not pretty printed and spans multiple lines it is possible to set breakpoints. But as soon as the pretty print function is used it stops working.
Expected results:
It should still be possible to set breakpoints on the pretty printed code.
Reporter | ||
Comment 1•4 years ago
|
||
I forgot to mention: please see attached video on how to reproduce. Video is hevc (h265) encoded so you might need vlc to play it.
Comment 2•4 years ago
|
||
Thanks for the report!
I can easily reproduce the problem on my machine.
I created simplified test case here:
http://janodvarko.cz/tests/bugzilla/1687165/
Honza
Reporter | ||
Comment 3•3 years ago
|
||
Hi :Honza, may I ask why this hasn't been fixed yet, if you can easily reproduce? It's soon been half a year.
Comment 4•3 years ago
|
||
Yes, sorry about that. We are small team and this bug is not on top of our list (not on our roadmap) at this moment.
But, it isn't forgotten.
Honza
Reporter | ||
Comment 5•3 years ago
|
||
Thanks for the answer. That's very sad though. Is there no ambition from Mozilla to make Firefox compete with Chrome?
In newest developer edition (v90) the debugger was basically completely ruined in some cases, where it's impossible to step through code. But why should I bother reporting when it won't get fixed anyways?
Is it not possible for you to get a bigger team? Is it possible to specifically donate towards an issue?
Also, do you have some documentation on how I can build firefox and where I can find the source code of the debugger/where is this functionality defined?
Updated•2 years ago
|
Updated•2 years ago
|
Comment 6•2 years ago
|
||
So did some investigation around this, this is not a sourcemaps issue, changing the meta
Comment 7•2 years ago
|
||
This is fixed by Alex work in Bug 1687166
Description
•