Last modified: 2012-06-27 13:29:59 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 T37061, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35061 - Unable to use debug mode when previewing a user script
Unable to use debug mode when previewing a user script
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.19
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 25610
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-08 11:26 UTC by Helder
Modified: 2012-06-27 13:29 UTC (History)
3 users (show)

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


Attachments

Description Helder 2012-03-08 11:26:25 UTC
It removes the debug=1 from URL.

Compare the result of typing
----
alert(mw.log);
----

on each of
1) https://en.wikipedia.org/wiki/User:YourUserName/common.js?action=edit
2) https://en.wikipedia.org/wiki/User:YourUserName/common.js?action=edit&debug=1
and clicking on preview after that. The result will be the same in both cases:
----
function (){}
----

In (2), the message should display the code which appears if you type "alert(mw.log);" in your browser's console, when in debug mode, not the dummy function which is used on "production mode".

This makes it harder to debug some scripts.
Comment 1 Krinkle 2012-06-21 02:00:36 UTC
You can set cookie "resourceLoaderDebug" to do this.

This was done in bug 25610, which has been fixed 2 years ago, before the first release of ResourceLoader even. It simply wasn't documented.

Closing as worksforme.
Comment 2 Helder 2012-06-27 13:29:59 UTC
(In reply to comment #1)
> You can set cookie "resourceLoaderDebug" to do this.
Thanks!
I've created a small JS to add a toggle for this cookie:
https://pt.wikibooks.org/w/index.php?oldid=237110

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


Navigation
Links