Closed Bug 1802515 Opened 3 years ago Closed 3 years ago

Debug .js file generated from .ts (only .js and .js.map available)

Categories

(DevTools :: Debugger, defect, P2)

Firefox 108
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1603421

People

(Reporter: mtester270, Unassigned)

References

(Blocks 1 open bug, )

Details

Attachments

(3 files)

31.80 KB, image/png
Details
15.96 KB, image/png
Details
2.55 KB, application/x-zip-compressed
Details
Attached image buggy.png

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0

Steps to reproduce:

Open web page where is only available .js & .js.map files (no .ts) and when i put breakpoint in .js file it not works ... debugger trying to go to .ts file which is not avail and got error:
Error while fetching an original source: can't assign to property "metadata" on "request failed with status 404": not an object
Source URL: <unknown>

Also try ignore .ts file but this cause no page break and loads normally.

Actual results:

break-point not hit and page breaks on that error

Expected results:

Break and step into .js file (in chrome it works normally)

The Bugbug bot thinks this bug should belong to the 'DevTools::Debugger' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Debugger
Product: Firefox → DevTools

Thanks Mark for reporting!

Can you provide a link to webpage we can use to reproduce the issue?

Flags: needinfo?(mtester270)

Hi,

sry it's not possible (it is a customer portal and also behind VPN), so maybe this can help:

  • it's .net MVC project with angular and this is a file structure in VS dev project and server (part of source included in attachment if could help)
Flags: needinfo?(mtester270)
Attached image buggy2.png
Attached file sources.zip
Severity: -- → S3
Flags: needinfo?(poirot.alex)
Priority: -- → P2
Status: UNCONFIRMED → NEW
Ever confirmed: true

For the record, we managed to reproduce the bug. STRs available on https://test-case-bug1802515.glitch.me/

See Also: → 1603421

Bomsy, do you think we should close this as dupe of Bug 1603421, but bump the severity to P2? I don't think the initial bug captured how this was completely preventing from using the debugger.

I quickly tested on Chrome, and the behavior is very similar. The only minor difference is that it attempts to jump to the original file when you create the breakpoint, which maybe makes it a it clearer?

There are interesting discussions in Bug 1603421 about situations where only some files might be missing so you'd still like to preserve the sourcemap behavior for other files (potentially leading to inconsistencies in the callstack etc...). Would make sense to keep the conversation in one place, or do you think this bug is worth keeping on its own?

Flags: needinfo?(hmanilla)

(In reply to Julian Descottes [:jdescottes] from comment #7)

Bomsy, do you think we should close this as dupe of Bug 1603421, but bump the severity to P2? I don't think the initial bug captured how this was completely preventing from using the debugger.

I quickly tested on Chrome, and the behavior is very similar. The only minor difference is that it attempts to jump to the original file when you create the breakpoint, which maybe makes it a it clearer?

Interesting... so Chrome seems to try to jump to the .ts file when the user tries to set the breakpoint (therefore the breakpoint never gets set). I notice we try to jump after the users sets the breakpoint and then tries to reload. For me the breakpoint seems to get hit and pauses (example on line 4) before it tries to jump to the .ts file.

There are interesting discussions in Bug 1603421 about situations where only some files might be missing so you'd still like to preserve the sourcemap behavior for other files (potentially leading to inconsistencies in the callstack etc...). Would make sense to keep the conversation in one place, or do you think this bug is worth keeping on its own?

Yeah, I think we could close this as a dupe of Bug 1603421. All the relevant discussions are over there, and its nice to keep it all in one place. The main thing Bug 1603421 lacks is a good STR, so we can use our usecase here to add an STR there.

Flags: needinfo?(hmanilla)

Hi Mark,
Please see comment https://bugzilla.mozilla.org/show_bug.cgi?id=1603421#c7.
Does the test case match the issue you are seeing?

Thanks

Flags: needinfo?(mtester270)

yup :)

Flags: needinfo?(mtester270)

(In reply to mark from comment #10)

yup :)

Great! Thanks.

I'm closing this bug in favour of Bug 1603421 as some discussions have already happened there and its nice to keep it all in one place.
Thanks

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

Attachment

General

Creator:
Created:
Updated:
Size: