In order to help people with solving errors in their Javascript code, Opera comes bundled with a JS console. This allows you to see why Opera refuses to execute your scripts.
The console can be found under Tools > Advanced > Javascript console. You may also want to put the console in a panel (open Opera folder/jsconsole.html > Add bookmark > Show in panel).
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.
Some people have already customized their javascript console:
The following pages can be used to test whether or not your JS console is functioning correctly (that is, they contain script errors):