I try to debug a javascript function called from Generate Thumbnails plugin in WordPress. The function uses jquery. So the actual call that I want to debug occurs in jquery.
The problem is that default jquery.js inside WordPress is minimized and therefore obscure. I changed that file with the uncompressed version of jquery.js file in wp-includesjsjquery.
But when I debug that function with Firebug’s debugger, Firebug still shows me the old, minimized version of jquery:
I copied the location of the script file shown in Firebug and opened it in browser: http://localhost/wordpress/wp-admin/load-scripts.php?c=1&load=jquery,utils,jquery-ui-core,jquery-ui-widget&ver=368b0ffbc13bc55b5ae45ad40a5368d9
This time, the true, uncompressed version of jquery.js was opened.
It seems like Firebug opens the old version of jquery. I restarted the Firefox but it wasn’t resolved.
What might be the reason of this problem? Is this Firebug related or WordPress related?
I’d agree with the people who commented on your question – it seems like a browser cache problem.
If it’s a test system, one thing I’d suggest is setting the
WP_DEBUG
constant totrue
in yourwp-config
. That’ll download the uncompressed versions of the javascript libraries. That has two advantages:.dev
in them, from memory), so you shouldn’t hit any caching issues.I’m assuming there’s an uncompressed version of jquery in WordPress. Apologies if there isn’t; I haven’t checked. But in general I’d recommend this approach.
See Debugging in WordPress in the codex for more information.