本文介绍了在IE8中找到与javascript错误完全一致的行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我的javascript代码出错,并且我在google chrome上运行该页面,我会点击扳手图标>工具> JavaScript控制台,它会显示我(红色)我js中的确切行导致错误。

If I have an error in my javascript code, and I run the page on google chrome, I click wrench icon > tools > JavaScript console, and it shows me (in red) the exact line in my js causing the error.

在IE上,我点击黄色!状态栏中的图标,它会给我一条错误消息,以及一行#。虽然这通常很有帮助,但很多时候它不是:(1)我的源文件中的行#常常与IE给我的行#不同; (2)在复杂的系统中,可能涉及几个js文件,IE消息不告诉我哪一个。

On IE, I click the yellow "!" icon in the status bar, and it gives me an error message, along with a line #. While this is often helpful, many times it is not: (1) the line # in my source file often differs from the line # that IE gives me; (2) in complex systems, there might be several js files involved, and the IE message doesn't tell me which one.

所以我的问题是:有没有让IE8向我显示错误的确切js行的选项 - 无需安装任何东西?

So my question is: are there any options that get IE8 to show me the exact js line with the error -- without having to install anything?

我知道IE8有​​一个内置的javascript控制台,并且我记得使用它,但我不记得如何用它来实现我在这篇文章中所说的目标。

I know that IE8 has a built-in javascript console, and I recall using it, but I don't remember figuring out how to achieve with it the goal I've stated in this post.

提前致谢。

推荐答案

在IE8上使用开发工具怎么样?我已经使用了一段时间,效果很好。您可以在工具菜单上或按F12键找到它。

What about using "Developing Tools" on IE8? I've been using for a while and works well. You can find it on "Tools" menu or pressing F12 key.

如果您转到脚本选项卡,您可以找到控制台,断点,局部变量等对你有用。

If you go to "Script" tab, you can find console, breakpoints, local variables, etc that could be useful to you.

这篇关于在IE8中找到与javascript错误完全一致的行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 21:41