Hovering over a function in minified source doesn't let you navigate to the destination
Categories
(DevTools :: Debugger, defect, P3)
Tracking
(firefox137 fixed)
Tracking | Status | |
---|---|---|
firefox137 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: ochameau)
References
(Depends on 1 open bug, Blocks 1 open bug, )
Details
Attachments
(1 file)
STR:
<script src=scope.js></script>
scope.js
:
var o=f();o.inc();o.m();console.log(o.get());function f(){var p=0;var k=5;return{inc:function(){p++},get:function(){return p},m:function(){console.log("fod")}}}
Load the above and unminify the js source. Set the debugger to break on the first line o=f()
. Hover over f
and then click on 'go to function' button. It doesn't navigate or highlight f
in yellow.
If scope.js isn't minified in the first place it works fine.
Reporter | ||
Updated•9 months ago
|
Comment 1•9 months ago
|
||
Bomsy built a test page for this bug: https://bug-1932021.glitch.me/
Evaluating f
in the console and jumping to definition from there actually works, so it should be feasible to fix this in the debugger.
Note that jump to definition in the debugger seems flaky and doesn't always work, might not be only about unminified files.
Assignee | ||
Comment 2•8 months ago
|
||
Assignee | ||
Comment 3•7 months ago
|
||
I'm having some more general fixes around pretty print to land first in bug 1917012.
Comment 4•7 months ago
|
||
I've found another case where the jump-to-definition button doesn't work:
<script>
function f() {}
const x = { f };
debugger;
</script>
if you debug this file and hover over f
then the jump-to-definition button works but if you hover over x
then the jump-to-definition button for the f
property doesn't work.
Updated•6 months ago
|
Description
•