Opera allows you to customize the JS console to your own likings, or even rewrite the entire console. You can do so by editing/overwriting a local file (if you want it to show up in the JS console, you should use Opera directory > jsconsole.html), which uses the following proprietary JS functions:
Returns the index of the last error message. This index is monotonically increasing (which limits us to about 2^53 errors per Opera session)
Returns the error message at index i. The value returned may be #f, if that message has been flushed from the cache.
Clear all messages from the queue. This operation is restricted: it can only be executed in documents that come from a file: URL.
Show the URL in the source viewer. This operation is restricted: it can only be executed in documents that come from a file: URL.
For help in debugging, postError is also provided:
Use from your own scripts to print debug statements to the console window. Each 'msg' is printed as a separate message in the console.
The following pages can be used to test whether or not your JS console is functioning correctly (that is, they contain script errors):