Closed Bug 1433373 Opened 3 years ago Closed 1 year ago

Jump to definition button in console does not handle sourcemap


(DevTools :: Console, defect, P2)



(firefox60 wontfix, firefox71 fixed)

Firefox 71
Tracking Status
firefox60 --- wontfix
firefox71 --- fixed


(Reporter: nchevobbe, Assigned: wartmanm)




(1 file, 1 obsolete file)

Steps to reproduce:
1. Go to
2. Open the console
3. See the "render()" function logged
4. Click on the "jump to definition" button

Expected results:

The app.jsx tab is open in the debugger

Actual results:

The bundle source is open in the debugger.
In this case the bundle is small and quite readable so it's not really an issue. In other configurations this might be a problem.
Also, if there's a sourcemap file, we should always try to use it and navigate the user to the original file.
Nicolas, am I right that this also fixes jumping to pretty-printed sources as mentioned in Or are pretty-printed sources handled differently to source-mapped files?

Flags: needinfo?(nchevobbe)
Second question: What's the bug the "jump to definition" button was implemented? I couldn't find it and wanted to mark it as dev-doc-needed.

This was implemented in Reps, which are in Github, and the hook in the webconsole was added in Bug 1419787.

For the pretty-printed source, I do think it is using sourcemap, but I'm not sure.
I'll check when this bug is fixed.
Flags: needinfo?(nchevobbe)
Product: Firefox → DevTools
Priority: -- → P2

Hi, is this bug available?

Hello Matthew, yes it is :) Are you interested working on it?

Yes, I'd like to work on it, please. I'm interested in making source maps more transparent in general.

Great, the bug is now yours :)

You can read through to set up everything to work on devtools.

Then, this is the place where we create the jump to definition button devtools/client/debugger/packages/devtools-reps/src/reps/function.js#36-49

You can see that we execute onViewSourceInDebugger which we pass to the React component.
So we need to run the location through a sourcemap service, like we do in

You can join us on Slack if you want to discuss anything :)

Assignee: nobody → mattheww
Depends on: 901138

Bundle changes

Attachment #9095280 - Attachment is obsolete: true
Blocks: 1585407
Keywords: checkin-needed

Pushed by
Use source mapping for console jump to definition button r=nchevobbe

Keywords: checkin-needed
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
Regressions: 1589346

Mattheww, you indicated this bug regressed Bug 1589346, but I don't think it really did?

Flags: needinfo?(wartmanm)

You're right, I'm very sorry. It's the same issue but a different regression.

Flags: needinfo?(wartmanm)
Regressions: 1590824
No longer regressions: 1589346
QA Whiteboard: [qa-71b-p2]
You need to log in before you can comment on or make changes to this bug.