Reputation: 143
In Chrome Devtools console, if I output a Function object, it shows the top few lines of the function. I can click on the function name in the output and it takes me to the file and line where the function were loaded from (or from the original source if theres a source map):
In the new Firefox Devtools (Quantum) is it possible to find the sourcefile and linenumber for the function? Clicking on it only reveals the Function object itself:
I found i can use Function.toSource()
to view the source code in Firefox Devtools console . But it gives no hint about which file or line it's from:
Upvotes: 2
Views: 499
Reputation: 20125
The DevTools show a button to jump to the function's definition for quite some time now.
I cannot pinpoint in what version this feature got added but it must have been around Firefox 61 when the new Console UI got enabled.
Upvotes: 2