Last modified: 2014-10-24 01:03:50 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 T74462, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72462 - Show the stack trace on error when using the debug console
Show the stack trace on error when using the debug console
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Scribunto (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-23 23:48 UTC by Mr. Stradivarius
Modified: 2014-10-24 01:03 UTC (History)
4 users (show)

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


Attachments
Screenshot of the current debug console error behaviour (30.83 KB, image/png)
2014-10-24 01:03 UTC, Mr. Stradivarius
Details

Description Mr. Stradivarius 2014-10-23 23:48:15 UTC
It would be nice if errors in the debug console showed the stack trace as well as the error message.

For a function f(...) that produces an error, you can get the stack trace with this code:

xpcall(function() return f(...) end, debug.traceback)

However, it can be a pain to type this out every time you want a stack trace, and newer coders might not be aware that this feature of Lua exists. And in my experience, if you get an error in the debug console, more often than not you want to see the stack trace.

If screen real estate is thought to be a problem then the stack trace could be collapsible, but personally I don't think any extra formatting is necessary.
Comment 1 Mr. Stradivarius 2014-10-24 01:03:50 UTC
Created attachment 16874 [details]
Screenshot of the current debug console error behaviour

This screenshot shows the current error behaviour in the debug console, first with a function producing an error, and then with the strack trace for that error as found with xpcall.

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


Navigation
Links