Function injectTraceFeature

  • Inject code for a new debug feature that traces when a class' method is called, if the class calls the same method for other objects (prints tree) and how long each call took in milliseconds.

    Parameters

    • classObj: any

      The class. Widget for example

    • methodKey: string

      The key of the property to watch. "paint" for example

    • messageGenerator: null | ((...args: any[]) => string) = null

      A function that returns a string with extra information about the function call. For example, a function which returns " (forced)" if Widget.paint is called with forced set to true

    Returns void