Last modified: 2011-03-13 18:04:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T27153, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25153 - Add wfDebug of loaded modules
Add wfDebug of loaded modules
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Trevor Parscal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-12 15:31 UTC by Chad H.
Modified: 2011-03-13 18:04 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Chad H. 2010-09-12 15:31:38 UTC
It would be helpful for developers to easily see what resources are being loaded on a page request. Adding wfDebug() with the loaded JS/CSS files would be very helpful :)
Comment 1 Roan Kattouw 2010-09-13 15:35:56 UTC
(In reply to comment #0)
> It would be helpful for developers to easily see what resources are being
> loaded on a page request. Adding wfDebug() with the loaded JS/CSS files would
> be very helpful :)
How does this show things that are not obvious from looking at the AJAX requests in Firebug's Console or Net panel?
Comment 2 Chad H. 2010-09-13 15:38:28 UTC
I suppose it doesn't really, I just figured a single line in the debug log like

"ResourceLoader, loaded: jquery, jquery.ui, mediawiki.legacy.ajax"

Might be handy. Go ahead and WONTFIX if you don't think so :)
Comment 3 Krinkle 2011-03-11 22:42:58 UTC
Marking WONTFIX as this seems something for client side rather than server side.

In the client side you can set url-parameter debug=true (or enforce it via $$wgResourceLoaderDebug i LocalSettings.php) at which points debug calls to mw.log() will be outputted to a #mw-log-console (or your native JS Console if you have one).

We should add mw.log() calls to the core modules to indicate when stuff is loaded.

I've made a start in r83658. It not only logs when a module fails but also if and when a module is loaded at all and which state it is set to.

It does it for all default modules except for special modules like startup, site and user. But that's just a matter of adding a line like:

mw.log( 'Site module loaded' );

etc.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links