Open Bug 1250722 Opened 9 years ago Updated 2 years ago

Source maps in memory tool

Categories

(DevTools :: Memory, defect, P5)

defect

Tracking

(Not tracked)

People

(Reporter: jsantell, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-needed)

Attachments

(1 file)

As this is the first full tool to use the Source component, seems this would be the easiest place to start, as the console would require a bit more overhead as it can't use the React component at the moment (I'm not interested in tackling in converting that to html/browser loader right now)
This is a bit tricky because the snapshots are from a past moment in time and there is no guarantee that the source maps that existed when the snapshot was taken still exist or haven't been overridden, etc. Furthermore, the allocation stacks we get out of the snapshot are SavedFrame objects. They don't hold any reference to the script that created them, nor do we serialize that script into and deserialize it back out of snapshots. This means that we have no way to get the sourceMappingURL for each frame in the stack. We could add an extra field to SavedFrame and store this information there, but it would still be subject to the above issue.
Has STR: --- → irrelevant
All good points -- the patch in bug 1177279 however just needs a URL source and line (column optional), so the saved frames give us enough for that. But that assumes that the Debugger sources are still around, which like you said, may not be the case, or could be outdated. Hmmm.
The best solution would be to push new locations down into the engine so that we always get the translated location where ever we ask from. Then we could fix this problem once and for all and delete a lot of really annoying devtools code that relies on us remembering to check and having to do a lot of plumbing and it would all Just Work.
Assignee: jsantell → nobody
Status: ASSIGNED → NEW
Priority: P2 → P3
Blocks: source-maps
I assume there will be some UI changes to toggle the source mapping like in other tools, which should be documented once implemented. Sebastian
Keywords: dev-doc-needed
Priority: P3 → P5
I have a WIP patch from a while back that I'm going to attach. Haven't really tried it and didn't write a test case. It doesn't even try to deal with the out-of-date snapshot issue.
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: