如何获得最后执行的JS函数

时间:2021-08-31 00:49:01

I'm working on a large and old project that run tons to JavaScript and sometimes when solving a bug its a bit hard to know which function has executed.

我正在开发一个大型和旧的项目,运行吨到JavaScript,有时在解决bug时,有点难以知道哪个函数已执行。

Is there a way to get a list of the last executed functions in Chrome Developer Tools?

有没有办法获取Chrome开发者工具中最后执行的功能列表?

1 个解决方案

#1


You have two options for resolving this issue:

您有两种方法可以解决此问题:

  • You should use Profiler in Chrome Develper Tools:

    您应该在Chrome Develper工具中使用Profiler:

    • Step 1: 如何获得最后执行的JS函数

    • Step 2 如何获得最后执行的JS函数

So you can see list functions which was executed while profiling.

因此,您可以看到在分析时执行的列表函数。

  • Also you can use PageSpeed Insights for Google Chrome extension (link)
  • 您也可以使用PageSpeed Insights for Google Chrome扩展程序(链接)

#1


You have two options for resolving this issue:

您有两种方法可以解决此问题:

  • You should use Profiler in Chrome Develper Tools:

    您应该在Chrome Develper工具中使用Profiler:

    • Step 1: 如何获得最后执行的JS函数

    • Step 2 如何获得最后执行的JS函数

So you can see list functions which was executed while profiling.

因此,您可以看到在分析时执行的列表函数。

  • Also you can use PageSpeed Insights for Google Chrome extension (link)
  • 您也可以使用PageSpeed Insights for Google Chrome扩展程序(链接)