简体   繁体   English

如何为网站调试IE8客户端问题?

[英]How to debug a IE8 client-side issues for a website?

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. 我的一个网站的用户正在使用他的IE8 / WinXP设置遇到Javascript问题,代码执行显然在中途中止,但是没有警告框或其他提示,为什么我无法在本地复制问题。 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. 只是弄清楚代码中止的位置会非常有帮助,但是AFAIK IE8没有像Firefox的错误控制台那样只记录警告。 I know IE8 has Developer Tools built-in, but is it of any use if the user is not a developer? 我知道IE8内置了开发人员工具,但如果用户不是开发人员,它有用吗?

The following question suggests logging in remotely to the client's system, but I'm not sure this will be possible to arrange. 以下问题建议远程登录客户端系统,但我不确定这是否可以安排。

How to remotely debug customer issues with a website 如何使用网站远程调试客户问题

The user can turn on Javascript logging in IE8, if they are tech-savvy enough. 如果用户足够精通技术,用户可以在IE8中打开Javascript日志记录。 (It's not hard, but we all know how good users normally are with computers...): (这并不难,但我们都知道用户通常对计算机有多好......):

Get them to go to Internet Options -> Advanced . 让他们转到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...). 这应该会导致所有Javascript错误被记录 - 你可以通过点击一个黄色警告三角形来查看它们,iirc将出现在有破坏Javascript的网站上(也就是说,世界上几乎每个网站......)。 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. 它确实依赖于用户相当精通技术 - 你真的只想得到他们的机器tbh。

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. IE7 / IE8有一个名为开发人员工具的插件及其真正的好处(与FireFox的FireBug相当),你可以在客户端为你的javascript做所有的调试,观看等。

See a similar (duplicate?) post on SO: Firebug alternative for the IE 在SO上看到类似的(重复?)帖子: IE的Firebug替代品

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. IE 8开发工具非常方便,但我认为它们对非开发人员没有任何帮助......你可能会要求他安装它们,启动调试器,并让它在所有错误上中断。 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. 最后一个选择是在你的javascript中添加日志以捕获并记录错误,也许他们会给你一些线索。

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. 大多数时候,事实证明某些脚本没有及时正确加载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM