Sergey Novikov
Sergey Novikov

Reputation: 4196

ExtJS 4 Track all events for a component

For debugging purposes I want to track all events for a certain component (combo, form, etc.) so I could see when and what events have fired for this component.

Is there a common approach to tracking all events without creating specific listeners?

Upvotes: 3

Views: 1706

Answers (1)

Saki
Saki

Reputation: 5856

You can use Ext.util.Observable for this purpose. Let's say the reference is myCombo:

Ext.util.Observable.capture(myCombo, function(){console.log(arguments)});

I use this one-liner quite often from the console to see the fired events.

Upvotes: 7

Related Questions