You could put this in a custom class that extends Sprite, if you wanted, or if the code is useful enough, we might consider adding certain functionality behind a define (such as -Dopenfl-debug-listeners with #if openfl_debug_listeners wrapping the code), but this seems like something that might be more of a one-time thing to do?
I thought i would need the additional code in more classes than Sprite, thats why i chose DisplayObject as the common base to implement my code.
But as it turns out, i only do use Spriteā¦ -> MySprite it is
Its just some simple testcode, i collect all added Eventlistener with their PosInfos in an Array and remove them on removeEvent.
Still its a nice way to see, which Events(and where) got forgotten to be removed.