Search code examples
google-chromeinternet-explorermozilla

Is there a way to perform event tracing in browser?


I am testing my website and we encountered some issue that we cannot replicate constantly. Is there any function we can use in the browser to see a list of event triggered, and what user entered to trace the error?

Thanks in advance Brian


Solution

  • From the console you can usefully monitor events with the monitorEvents API. The API takes an object to be monitored and then an event to listen for.

    Example:

    monitorEvents(window,"click");  
    

    Output in MS Edge beta (Chromium):

    enter image description here

    Reference:

    Monitor Events

    It will work with MS Edge (Chromium) and Google Chrome browser. For Firefox you can try to check Firebug extension.