Closed Bug 1687165 Opened 3 years ago Closed 1 year ago

Cannot set breakpoints after using "pretty print source" on new Function() sources

Categories

(DevTools :: Debugger, defect, P3)

Firefox 85
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1687166

People

(Reporter: random_n0body, Unassigned)

References

(Blocks 3 open bugs)

Details

Attachments

(1 file)

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

  1. Go to https://www.paulbrunngard.com/se/skovards-produkter/impregneringsspray-och-refresh/footwear-repel
  2. Open devtools (f12)
  3. select the source starting with static-scripts-deploy.s3
  4. select the javascript file called "depict-aj.js"
  5. click the "pretty print source" button
  6. put a breakpoint on line 23 / the line containing "new Function"
  7. reload the page
  8. 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"
  9. step through it a little bit to convince yourself that debugging it does actually work
  10. hit the pretty print button (this time on the source called "source123" or similar)
  11. 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.

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.

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

Severity: -- → S3
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Priority: -- → P3

Hi :Honza, may I ask why this hasn't been fixed yet, if you can easily reproduce? It's soon been half a year.

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

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?

See Also: → 1687166

So did some investigation around this, this is not a sourcemaps issue, changing the meta

Blocks: dbg-sources
No longer blocks: dbg-sourcemap

This is fixed by Alex work in Bug 1687166

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1687166
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: