Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ExtJs debug : capture all events
// to capture ALL events use:
Ext.util.Observable.prototype.fireEvent =
Ext.util.Observable.prototype.fireEvent.createInterceptor(function() {
console.log(this.name);
console.log(arguments);
return true;
});
// to capture events for a particular component:
Ext.util.Observable.capture(
Ext.getCmp('my-comp'),
function(e) {
console.info(e);
}
);
@AEKirin

This comment has been minimized.

Copy link

AEKirin commented Mar 3, 2013

Where exactly do you place this code? In the controller? the app.js? thanks

@fafk

This comment has been minimized.

Copy link

fafk commented Jan 31, 2014

The browser console window :)

@codinguncut

This comment has been minimized.

Copy link

codinguncut commented Mar 31, 2014

createInterceptor seems to have been removed.
Please compare here for a newer version:
http://www.sencha.com/forum/showthread.php?124506-createInterceptor-missing

The following works for me in Ext.js 4.2.2:

Ext.util.Observable.prototype.fireEvent = Ext.Function.createInterceptor(Ext.util.Observable.prototype.fireEvent, function() { console.log(this.name); console.log(arguments); return true; });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.