Open Bug 1695637 Opened 4 years ago

The "From <generated>" footer unexpectedly always goes to line 1 of generated file

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: Honza, Unassigned)

References

(Blocks 1 open bug)

Details

Originally reported here: https://github.com/firefox-devtools/debugger/issues/8088

When viewing a sourcemapped file, the editor shows a (From <file>) footer just below it that will take the users to the generated file. The problem is that this footer always goes to the first line of the generated file, which I don't think is particularly useful once your bundle grows.

The quickest thing would be to find the line/column of the first mapping in the original file. In a perfect world though, we'd use the current editor scroll position on the original file to pick a specific mapping to jump to in the generated file.

I'm not familiar with how we track the current position on files, but it may make sense to try to make some common logic for this kind of thing.

You need to log in before you can comment on or make changes to this bug.