Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
function debug_image()
{
 var title  = mw.config.get('wgCanonicalNamespace') + ':' + mw.config.get('wgTitle');
 var file   = document.getElementById('file'); 
 if( !file ) return;
 var images = file.getElementsByTagName('img');

 var debug = ''; 
 for( var i = 0; i < images.length; i++ )
  if( images[i].alt && images[i].alt == title )
  {
   for( key in images[i] )
    if( typeof( images[i][key] ) == 'string' || typeof( images[i][key] ) == 'number' )
     debug += key + '=' + images[i][key] + '<br>';
    break;
  }

 file.innerHTML = debug;
}

$( debug_image );