【问题标题】:Find the source file of a function in Firefox DevTools在 Firefox DevTools 中查找函数的源文件
【发布时间】:2018-01-16 14:32:54
【问题描述】:

在 Chrome Devtools 控制台中,如果我输出一个 Function 对象,它会显示该函数的前几行。我可以单击输出中的函数名称,它会将我带到函数加载的文件和行(如果有源映射,则从原始源加载):

在新的 Firefox Devtools (Quantum) 中是否可以找到函数的源文件和行号?点击它只会显示 Function 对象本身:

我找到了i can use Function.toSource() to view the source code in Firefox Devtools console。但它没有提示它来自哪个文件或行:

【问题讨论】:

    标签: firefox-developer-tools


    【解决方案1】:

    DevTools 显示一个用于跳转到函数定义的按钮已经有一段时间了。

    我无法确定此功能是在哪个版本中添加的,但它肯定在 Firefox 61 when the new Console UI got enabled 附近。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-01
      • 2016-06-14
      • 1970-01-01
      • 1970-01-01
      • 2018-08-02
      • 2015-12-21
      相关资源
      最近更新 更多