Angular中的探查器火焰图未显示我的功能

时间:2019-02-12 12:18:37

标签: angular google-chrome-devtools profiling zonejs

这是我的探查器针对使用angular-cli构建的Angular 7应用程序显示的内容。

profiler schreenshot

每个函数调用都捆绑在zone.js下,我无法获得有关运行时间和运行时间的有用信息。


该应用正在运行:ng serve,并且我认为处于调试模式:

在main.ts

if (environment.production) {
  console.log('production mode!');
  enableProdMode();
} else {
  console.log('debug mode!');

在运行时,不会调用enableProdMode()

我以为我的angular.json配置了webpack以在生产模式下运行,但是它与带有ng new的新项目(区别于它们)完全相同,只是添加了一些外部脚本+ scss文件。

1 个答案:

答案 0 :(得分:0)

我正在寻找的工具现在在chrome开发工具中称为Javascript Profiler(隐藏在右上角的三个点菜单中)。

enter image description here