Debug Module

Start monitoring events

Description:
A tool is designed to monitor user interface (UI) events. It begins by actively listening for any events that are registered on the UI. The tool remains in this monitoring state until it is manually stopped. Upon stopping, it provides a detailed report of all the events that are still attached to the UI. This functionality is particularly useful for identifying memory leaks, as it highlights events that were not properly cleaned up and are still lingering in the system.

{
    "type": "debug",
    "action": "start_monitor_events"
}

Stop monitoring events

Description:
When performing this action you will get the result back of any leaks identified. The suggested procedure for this would be:

  1. Start at a resource neutral page like about:blank
  2. Start monitoring events
  3. Navigate to the page and perform your actions
  4. Navigate back to the neutral page
  5. Stop monitoring events
{
    "type": "debug",
    "action": "stop_monitor_events",
    "args": {
        "target": "$data.result"
    }
}

The result is an collection of objects with the following properties:

  1. target – the id or element tag to identify the element with
  2. type – the event type for example “click”
  3. path – the xpath of the element in the dom
  4. trace – the stack trace on where the event is attached to the element using addEventListener