Question

I use ExtJS and include the framework with <script src="ext/ext-dev.js"></script>.

Despite the fact that the ExtJS documentation makes extensive use of console.log, this function is not working, because it is somehow redefined to an empty function.

How can I enable console.log in ExtJS ? Is there a configuration option that I need to set on application loading ? Or is there another function used to log to the console ? (I found Ext.log, but it does not log to the console neither.)

ExtJS is redefining console.log. Outsite of ExtJs, alert(console.log); will output function log() { [native code ] }, inside of ExtJS, it will output only function log() {}, and console.log('message'); does nothing.

Was it helpful?

Solution

ExtJS does no such thing, as you can see by visiting for example ExtJS API docs, which run on ExtJS, opening the console and running console.log(). Something else in your code must be causing this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top