I am updating a site that I've built for the Nintendo Wii, and am looking for a good way to debug the application. Wii's browser (a version of Opera 9.3) does not have any sort of JavaScript console. I was going to use one of the various remote debug console solutions (such as jsconsole.com), but none of them seem to work. I suspect the reason for this is some sort of unsupported functionality, but I cannot figure out what that is without a console or some sort of error output.
Things I've tried:
window.onerror
(Not supported until Opera 11.6)- Overriding the
Error.prototype.toString
method (works on desktops, not on Wii) - Code that appears to wrap script in
try/catch
blocks (Exceptions aren't thrown for reference errors and what not.try
/catch
works, but only for exceptions I throw.) <body onerror="alert('ERROR!!!')" />
- PhoneGap's Remote Debugger / Weinre
Are there any other suggestions for catching errors and unhandled exceptions for an entire page?
try { // do stuff } catch (err) { document.getElementById('output').textContent = err; }
? I assume you have (and, as noted, if you haven't then I can't imagine it would speed up your work-flow, but might help a little...). – Correspondencetry/catch
block does work, but it seems that exceptions are not being thrown. If I throw my own exception, I can catch it, but things like null reference exceptions aren't thrown. – Catrinacatriona