捕获Wii / Opera 9上的所有JavaScript错误/异常 [英] Catching all JavaScript errors/exceptions on Wii/Opera 9

查看:77
本文介绍了捕获Wii / Opera 9上的所有JavaScript错误/异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在更新我为Nintendo Wii构建的网站,我正在寻找调试应用程序的好方法。 Wii的浏览器(Opera 9.3的一个版本)没有任何类型的JavaScript控制台。我打算使用各种远程调试控制台解决方案之一(例如 jsconsole.com ),但没有一个他们似乎工作。我怀疑这是因为某些不受支持的功能,但我无法弄清楚没有控制台或某种错误输出的情况。

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.

我所做的事情试过:


  1. window.onerror Opera 11.6之前不支持

  2. 覆盖 Error.prototype.toString 方法(适用于桌面设备) ,而不是在Wii上)

  3. 似乎在中包装脚本的代码尝试/ catch blocks (引用错误不会引发异常,不会抛出异常。 try / catch 有效,但仅适用于我抛出的异常。)

  4. < body onerror =alert('ERROR !!!')/ >

  5. PhoneGap的远程调试器/ Weinre

  1. window.onerror (Not supported until Opera 11.6)
  2. Overriding the Error.prototype.toString method (works on desktops, not on Wii)
  3. 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.)
  4. <body onerror="alert('ERROR!!!')" />
  5. PhoneGap's Remote Debugger / Weinre

是否有任何其他建议可以捕获整个页面的错误和未处理的异常?

Are there any other suggestions for catching errors and unhandled exceptions for an entire page?

推荐答案

您始终可以在调试代码中编程例如:

You could always program in the debugging code yourself, for instance:

try{
    yourFunction();
}catch(e){
    alert('yourFunction failed!');
}

这篇关于捕获Wii / Opera 9上的所有JavaScript错误/异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆