如何调试网站的 IE8 客户端问题?
我网站的一位用户在使用 IE8/WinXP 设置时遇到了 Javascript 问题,代码执行显然中途中止,但没有警报框或其他提示说明原因,而且我无法在本地复制该问题。我怎样才能从他的系统中获取任何信息,以便我可以开始调试它?
只要弄清楚代码在哪里中止就会非常有帮助,但据我所知,IE8 没有像 Firefox 的错误控制台那样只记录警告的功能。我知道IE8内置了开发者工具,但是如果用户不是开发者,它有什么用呢?
以下问题建议远程登录到客户的系统,但我不确定这是否可以安排。
One of my website's users is experiencing Javascript problems with his IE8/WinXP setup, with code execution apparently aborting halfway through, but there are no alert boxes or other hints as to why and I'm unable to replicate the problem locally. How can I get any information out of his system, so I can start debugging this?
Just figuring out where the code aborts would be very helpful, but AFAIK IE8 doesn't have anything like Firefox's Error Console that just logs warnings. I know IE8 has Developer Tools built-in, but is it of any use if the user is not a developer?
The following question suggests logging in remotely to the client's system, but I'm not sure this will be possible to arrange.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您仍然可以要求该人员打开开发人员工具,转到脚本标记并开始调试。即使他也不知道当某些代码遇到异常时您可能会获得有用的信息意味着什么。
过去,我们通常会去找那个客户帮助他/她。
大多数时候,结果是某些脚本没有正确加载或没有及时加载。
You can still ask the person to open the developer tools, go to the scripts tag and start debugging. Even he doesn't know what it means you might get helpful information when some code gets hit by an exception.
In the past we usually went to that client to help him/her out.
Most of the times it turned out to be that some script didn't get loaded properly or not in time.
IE 8 开发工具相当方便,但我不认为它们对非开发人员有任何帮助......您可能会要求他安装它们,启动调试器,并让它在所有错误时中断。但即便如此,对于非开发人员来说也可能太技术性了。此外,你还得要求他准确描述错误发生的地点和方式。
物理或远程访问他的机器将是最好的选择。还要确保您有重现错误的明确说明,以防万一您在本地丢失了某些内容。
最后一个选择是将日志记录添加到您的 JavaScript 中以捕获和记录错误,也许它们会给您一些线索。
IE 8 dev tools are rather handy, but I don't think they would be of any help to a non-developer... You could potentially ask him to install them, start the debugger, and have it break on all errors. But even that is likely too technical for a non developer. Also you'd be stuck asking him to describe exactly where and how the error was occurring.
Getting physical or remote access to his machine would be the best option. Also ensure you have explicit instructions to reproduce the error, just in case you're missing something locally.
One final option would be to add logging into your javascript to catch and record errors, perhaps they would give you some clues.
IE7/IE8 有一个名为开发人员工具的插件,它非常好(与 FireFox 的 FireBug 相比),您可以在客户端对 javascript 进行所有调试、监视等操作。
请参阅 SO 上的类似(重复?)帖子:IE 的 Firebug 替代品
IE7/IE8 has an addon named developer tools and its real good (comparable to FireBug for FireFox) and you can do all debug, watch etc for your javascript on clientside.
See a similar (duplicate?) post on SO: Firebug alternative for the IE
如果用户足够精通技术,他们可以在 IE8 中打开 Javascript 日志记录。 (这并不难,但我们都知道用户通常对计算机有多好......):
让他们转到
Internet选项->高级
。有一个“显示有关每个脚本错误的通知”选项,应选中该选项。现在,这应该会导致记录所有 Javascript 错误 - 您可以通过单击黄色警告三角形来查看它们,iirc,该三角形将出现在存在损坏 Javascript 的网站上(又名,几乎世界上每个网站......)。然后,用户可以将此信息复制给您。它确实依赖于用户相当精通技术——你真的只是想了解他们的机器。
The user can turn on Javascript logging in IE8, if they are tech-savvy enough. (It's not hard, but we all know how good users normally are with computers...):
Get them to go to
Internet Options -> Advanced
. There is a "Display a notification about every script error" option, which should be checked. This should now cause all Javascript errors to be logged - you can view them, iirc, by clicking on a yellow warning triangle which will appear on websites where there is broken Javascript (aka, almost every website in the world...). The user could then copy this information to you.It does rely on the user being fairly tech-savvy - you really just want to get at their machine tbh.